C# Class FarseerPhysics.Dynamics.Joints.PulleyJoint

The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. Warning: the pulley joint can get a bit squirrelly by itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static shapes to prevent one side from going to zero length.
Inheritance: Joint
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
lengthA float
lengthB float
localAnchorA Vector2
localAnchorB Vector2
ratio float

Méthodes publiques

Méthode Description
PulleyJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 worldAnchorA, Vector2 worldAnchorB, float ratio, bool useWorldCoordinates = false ) : System

Constructor for PulleyJoint.

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

Private Methods

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

Method Details

PulleyJoint() public méthode

Constructor for PulleyJoint.
public PulleyJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 worldAnchorA, Vector2 worldAnchorB, float ratio, 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.
worldAnchorA Vector2 The world anchor for the first body.
worldAnchorB Vector2 The world anchor for the second body.
ratio float The ratio.
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

lengthA public_oe property

Get the current length of the segment attached to body1.
public float lengthA
Résultat float

lengthB public_oe property

Get the current length of the segment attached to body2.
public float lengthB
Résultat float

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

ratio public_oe property

Get the pulley ratio.
public float ratio
Résultat float