C# Class FarseerPhysics.Dynamics.Joints.FixedDistanceJoint

A distance joint rains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
Inheritance: Joint
Show file Open project: scastle/Solitude Class Usage Examples

Public Methods

Method Description
FixedDistanceJoint ( Body body, Vector2 bodyAnchor, Vector2 worldAnchor ) : System

This requires defining an anchor point on both bodies and the non-zero length of the distance joint. If you don't supply a length, the local anchor points is used so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game. @warning Do not use a zero or short length.

GetReactionForce ( float invDt ) : Vector2
GetReactionTorque ( float invDt ) : float

Private Methods

Method Description
InitVelocityConstraints ( TimeStep &step ) : void
SolvePositionConstraints ( ) : bool
SolveVelocityConstraints ( TimeStep &step ) : void

Method Details

FixedDistanceJoint() public method

This requires defining an anchor point on both bodies and the non-zero length of the distance joint. If you don't supply a length, the local anchor points is used so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game. @warning Do not use a zero or short length.
public FixedDistanceJoint ( Body body, Vector2 bodyAnchor, Vector2 worldAnchor ) : System
body Body The body.
bodyAnchor Vector2 The body anchor.
worldAnchor Vector2 The world anchor.
return System

GetReactionForce() public method

public GetReactionForce ( float invDt ) : Vector2
invDt float
return Vector2

GetReactionTorque() public method

public GetReactionTorque ( float invDt ) : float
invDt float
return float