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

A rope joint enforces a maximum distance between two points on two bodies. It has no other effect. Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior. A model that would allow you to dynamically modify the length would have some sponginess, so I chose not to implement it that way. See b2DistanceJoint if you want to dynamically control length.
Inheritance: Joint
Show file Open project: scastle/Solitude

Public Properties

Property Type Description
LocalAnchorA Vector2
LocalAnchorB Vector2

Public Methods

Method Description
GetReactionForce ( float invDt ) : Vector2
GetReactionTorque ( float invDt ) : float
RopeJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB ) : System

Private Methods

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

Method Details

GetReactionForce() public method

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

GetReactionTorque() public method

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

RopeJoint() public method

public RopeJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB ) : System
bodyA Body
bodyB Body
localAnchorA Vector2
localAnchorB Vector2
return System

Property Details

LocalAnchorA public property

public Vector2 LocalAnchorA
return Vector2

LocalAnchorB public property

public Vector2 LocalAnchorB
return Vector2