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
Show file Open project: prime31/Nez Class Usage Examples

Public Methods

Method 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

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

Method Details

GearJoint() public method

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.
return System.Diagnostics

getReactionForce() public method

public getReactionForce ( float invDt ) : Vector2
invDt float
return Vector2

getReactionTorque() public method

public getReactionTorque ( float invDt ) : float
invDt float
return float