C# Class FarseerPhysics.Dynamics.Joints.GearJoint

A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 + ratio * coordinate2 = ant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length. @warning The revolute and prismatic joints must be attached to fixed bodies (which must be body1 on those joints).
Inheritance: Joint
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Méthode Description
GearJoint ( Body bodyA, Body bodyB, Joint jointA, Joint jointB, float ratio = 1f ) : System.Diagnostics

Requires two existing revolute or prismatic joints (any combination will work). The provided joints must attach a dynamic body to a static body.

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

Private Methods

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

Method Details

GearJoint() public méthode

Requires two existing revolute or prismatic joints (any combination will work). The provided joints must attach a dynamic body to a static body.
public GearJoint ( Body bodyA, Body bodyB, Joint jointA, Joint jointB, float ratio = 1f ) : System.Diagnostics
bodyA Body The first body
bodyB Body The second body
jointA Joint The first joint.
jointB Joint The second joint.
ratio float The ratio.
Résultat System.Diagnostics

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