search

Class myphysicslab.lab.engine2D.PathJoint

Provided By
Extends
All Implemented Interfaces

Represents a bilateral contact point between a RigidBody and a NumericalPath. Bilateral means that force can be applied to push or pull in the direction of the normal for the contact (in contrast to a contact force which can only push and never pull). The normal vector is determined by the NumericalPath. The normal vector specifies the direction along which the PathJoint operates: forces are calculated (by the engine2D physics engine) to keep the distance in the normal direction at zero between the two attachment points of the PathJoint.

A PathJoint is immutable: it cannot be changed after it is constructed.

A single PathJoint by itself will give a 'sliding track' type of connection. The attachment points must have zero distance between them as measured in the direction of the normal for the PathJoint, but in the direction orthogonal to the normal the attachment points are free to move.

Note that some slippage of a PathJoint can occur over time, especially when there is very fast rotation.

new PathJoint( path, body, attach_body )

Parameters
pathmyphysicslab.lab.model.NumericalPath

the path to connect

bodymyphysicslab.lab.engine2D.RigidBody

the RigidBody to connect

attach_bodymyphysicslab.lab.util.Vector

the attachment point on the RigidBody in body coordinates

Instance Methods

Static Properties