b2GearJoint Class Reference
#include <b2GearJoint.h>
List of all members.
Detailed Description
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).
Constructor & Destructor Documentation
Member Function Documentation
b2Vec2 b2GearJoint::GetAnchorA |
( |
|
) |
const [virtual] |
Get the anchor point on bodyA in world coordinates.
Implements b2Joint.
b2Vec2 b2GearJoint::GetAnchorB |
( |
|
) |
const [virtual] |
Get the anchor point on bodyB in world coordinates.
Implements b2Joint.
float32 b2GearJoint::GetRatio |
( |
|
) |
const |
b2Vec2 b2GearJoint::GetReactionForce |
( |
float32 |
inv_dt |
) |
const [virtual] |
Get the reaction force on body2 at the joint anchor in Newtons.
Implements b2Joint.
float32 b2GearJoint::GetReactionTorque |
( |
float32 |
inv_dt |
) |
const [virtual] |
Get the reaction torque on body2 in N*m.
Implements b2Joint.
void b2GearJoint::InitVelocityConstraints |
( |
const b2TimeStep & |
step |
) |
[protected, virtual] |
void b2GearJoint::SetRatio |
( |
float32 |
ratio |
) |
|
bool b2GearJoint::SolvePositionConstraints |
( |
float32 |
baumgarte |
) |
[protected, virtual] |
void b2GearJoint::SolveVelocityConstraints |
( |
const b2TimeStep & |
step |
) |
[protected, virtual] |
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files: