C# Class Project290.Physics.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: scastle/Solitude Class Usage Examples

Public Methods

Method Description
GearJoint ( Joint jointA, Joint jointB, float ratio ) : 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 inv_dt ) : Vector2
GetReactionTorque ( float inv_dt ) : float

Private Methods

Method Description
InitVelocityConstraints ( TimeStep &step ) : void
SolvePositionConstraints ( ) : bool
SolveVelocityConstraints ( TimeStep &step ) : 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 ( Joint jointA, Joint jointB, float ratio ) : System.Diagnostics
jointA Joint The first joint.
jointB Joint The second joint.
ratio float The ratio.
return System.Diagnostics

GetReactionForce() public method

public GetReactionForce ( float inv_dt ) : Vector2
inv_dt float
return Microsoft.Xna.Framework.Vector2

GetReactionTorque() public method

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
return float