C# Class Project290.Physics.Dynamics.Joints.SliderJoint

A distance joint contrains 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 Properties

Property Type Description
LocalAnchorA Vector2
LocalAnchorB Vector2

Public Methods

Method Description
GetReactionForce ( float inv_dt ) : Vector2
GetReactionTorque ( float inv_dt ) : float
SliderJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB, float minLength, float maxlength ) : System

Initializes a new instance of the SliderJoint class. Warning: Do not use a zero or short length.

Private Methods

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

Method Details

GetReactionForce() public method

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

GetReactionTorque() public method

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
return float

SliderJoint() public method

Initializes a new instance of the SliderJoint class. Warning: Do not use a zero or short length.
public SliderJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB, float minLength, float maxlength ) : System
bodyA Body The first body.
bodyB Body The second body.
localAnchorA Vector2 The first body anchor.
localAnchorB Vector2 The second body anchor.
minLength float The minimum length between anchorpoints
maxlength float The maximum length between anchorpoints.
return System

Property Details

LocalAnchorA public property

public Vector2 LocalAnchorA
return Vector2

LocalAnchorB public property

public Vector2 LocalAnchorB
return Vector2