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
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
localAnchorA Vector2
localAnchorB Vector2
maxLength float

Méthodes publiques

Méthode 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

Méthode Description
RopeJoint ( ) : System
initVelocityConstraints ( SolverData &data ) : void
solvePositionConstraints ( SolverData &data ) : bool
solveVelocityConstraints ( SolverData &data ) : void

Method Details

RopeJoint() public méthode

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.
Résultat System

getReactionForce() public méthode

public getReactionForce ( float invDt ) : Vector2
invDt float
Résultat Vector2

getReactionTorque() public méthode

public getReactionTorque ( float invDt ) : float
invDt float
Résultat float

Property Details

localAnchorA public_oe property

The local anchor point on BodyA
public Vector2 localAnchorA
Résultat Vector2

localAnchorB public_oe property

The local anchor point on BodyB
public Vector2 localAnchorB
Résultat 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
Résultat float