C# Class Project290.Physics.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 = ant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.
Inheritance: Joint
Afficher le fichier Open project: scastle/Solitude Class Usage Examples

Méthodes publiques

Свойство Type Description
GroundAnchorA Vector2
GroundAnchorB Vector2
LocalAnchorA Vector2
LocalAnchorB Vector2
MinPulleyLength float

Méthodes publiques

Méthode Description
GetReactionForce ( float inv_dt ) : Vector2
GetReactionTorque ( float inv_dt ) : float
PulleyJoint ( Body bodyA, Body bodyB, Vector2 groundAnchorA, Vector2 groundAnchorB, Vector2 localAnchorA, Vector2 localAnchorB, float ratio ) : System

Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.

Private Methods

Méthode Description
InitVelocityConstraints ( TimeStep &step ) : void
SolvePositionConstraints ( ) : bool
SolveVelocityConstraints ( TimeStep &step ) : void

Method Details

GetReactionForce() public méthode

public GetReactionForce ( float inv_dt ) : Vector2
inv_dt float
Résultat Vector2

GetReactionTorque() public méthode

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
Résultat float

PulleyJoint() public méthode

Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.
public PulleyJoint ( Body bodyA, Body bodyB, Vector2 groundAnchorA, Vector2 groundAnchorB, Vector2 localAnchorA, Vector2 localAnchorB, float ratio ) : System
bodyA Body The first body.
bodyB Body The second body.
groundAnchorA Vector2 The ground anchor for the first body.
groundAnchorB Vector2 The ground anchor for the second body.
localAnchorA Vector2 The first body anchor.
localAnchorB Vector2 The second body anchor.
ratio float The ratio.
Résultat System

Property Details

GroundAnchorA public_oe property

Get the first ground anchor.
public Vector2 GroundAnchorA
Résultat Vector2

GroundAnchorB public_oe property

Get the second ground anchor.
public Vector2 GroundAnchorB
Résultat Vector2

LocalAnchorA public_oe property

public Vector2 LocalAnchorA
Résultat Vector2

LocalAnchorB public_oe property

public Vector2 LocalAnchorB
Résultat Vector2

MinPulleyLength public_oe property

public float MinPulleyLength
Résultat float