C# Class FarseerPhysics.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
Mostrar archivo Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
localAnchorA Vector2
localAnchorB Vector2
maxLength float

Public Methods

Method Description
RopeJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System

Constructor for RopeJoint.

getReactionForce ( float invDt ) : Vector2
getReactionTorque ( float invDt ) : float

Private Methods

Method Description
RopeJoint ( ) : System
initVelocityConstraints ( SolverData &data ) : void
solvePositionConstraints ( SolverData &data ) : bool
solveVelocityConstraints ( SolverData &data ) : void

Method Details

RopeJoint() public method

Constructor for RopeJoint.
public RopeJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System
bodyA Body The first body
bodyB Body The second body
anchorA Vector2 The anchor on the first body
anchorB Vector2 The anchor on the second body
useWorldCoordinates bool Set to true if you are using world coordinates as anchors.
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

Property Details

localAnchorA public_oe property

The local anchor point on BodyA
public Vector2 localAnchorA
return Vector2

localAnchorB public_oe property

The local anchor point on BodyB
public Vector2 localAnchorB
return Vector2

maxLength public_oe property

Get or set the maximum length of the rope. By default, it is the distance between the two anchor points.
public float maxLength
return float