C# Class Box2DX.Dynamics.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 = constant 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: danielpcox/Crisis-at-Swiss-Station Class Usage Examples

Public Properties

Property Type Description
_J Jacobian
_constant float
_ground1 Body
_ground2 Body
_groundAnchor1 Box2DX.Common.Vec2
_groundAnchor2 Box2DX.Common.Vec2
_impulse float
_localAnchor1 Box2DX.Common.Vec2
_localAnchor2 Box2DX.Common.Vec2
_mass float
_prismatic1 PrismaticJoint
_prismatic2 PrismaticJoint
_ratio float
_revolute1 RevoluteJoint
_revolute2 RevoluteJoint

Public Methods

Method Description
GearJoint ( GearJointDef def ) : System
GetReactionForce ( float inv_dt ) : Vec2
GetReactionTorque ( float inv_dt ) : float

Private Methods

Method Description
InitVelocityConstraints ( TimeStep step ) : void
SolvePositionConstraints ( float baumgarte ) : bool
SolveVelocityConstraints ( TimeStep step ) : void

Method Details

GearJoint() public method

public GearJoint ( GearJointDef def ) : System
def GearJointDef
return System

GetReactionForce() public method

public GetReactionForce ( float inv_dt ) : Vec2
inv_dt float
return Box2DX.Common.Vec2

GetReactionTorque() public method

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

Property Details

_J public property

public Jacobian,Box2DX.Dynamics _J
return Jacobian

_constant public property

public float _constant
return float

_ground1 public property

public Body,Box2DX.Dynamics _ground1
return Body

_ground2 public property

public Body,Box2DX.Dynamics _ground2
return Body

_groundAnchor1 public property

public Vec2,Box2DX.Common _groundAnchor1
return Box2DX.Common.Vec2

_groundAnchor2 public property

public Vec2,Box2DX.Common _groundAnchor2
return Box2DX.Common.Vec2

_impulse public property

public float _impulse
return float

_localAnchor1 public property

public Vec2,Box2DX.Common _localAnchor1
return Box2DX.Common.Vec2

_localAnchor2 public property

public Vec2,Box2DX.Common _localAnchor2
return Box2DX.Common.Vec2

_mass public property

public float _mass
return float

_prismatic1 public property

public PrismaticJoint,Box2DX.Dynamics _prismatic1
return PrismaticJoint

_prismatic2 public property

public PrismaticJoint,Box2DX.Dynamics _prismatic2
return PrismaticJoint

_ratio public property

public float _ratio
return float

_revolute1 public property

public RevoluteJoint,Box2DX.Dynamics _revolute1
return RevoluteJoint

_revolute2 public property

public RevoluteJoint,Box2DX.Dynamics _revolute2
return RevoluteJoint