Class: MSPhysics::Contact

Inherits:
Entity
  • Object
show all
Defined in:
RubyExtension/MSPhysics/contact.rb

Overview

The Contact class represents an individual collision contact.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#inspect, #to_s

Constructor Details

#initialize(toucher, point, normal, force, speed) ⇒ Contact

Returns a new instance of Contact

Parameters:

  • toucher (Body)
  • point (Geom::Point3d, Array<Numeric>)

    Contact point.

  • normal (Geom::Vector3d, Array<Numeric>)

    Contact normal.

  • force (Geom::Vector3d, Array<Numeric>)

    Contact force.

  • speed (Numeric)

    Contact speed.

Since:

  • 1.0.0

Instance Attribute Details

#forceGeom::Vector3d (readonly)

Get contact force in Newtons.

Returns:

  • (Geom::Vector3d)

Since:

  • 1.0.0

#normalGeom::Vector3d (readonly)

Get contact normal.

Returns:

  • (Geom::Vector3d)

Since:

  • 1.0.0

#pointGeom::Point3d (readonly)

Get contact point.

Returns:

  • (Geom::Point3d)

Since:

  • 1.0.0

#speedNumeric (readonly)

Get contact speed in meters per second.

Returns:

  • (Numeric)

Since:

  • 1.0.0

#toucherBody (readonly)

Get contact body.

Returns:

Since:

  • 1.0.0