
Public Member Functions | |
| b2Vec2 | GetAnchor1 () const |
| Get the anchor point on body1 in world coordinates. | |
| b2Vec2 | GetAnchor2 () const |
| Get the anchor point on body2 in world coordinates. | |
| b2Vec2 | GetReactionForce () const |
| Get the reaction force on body2 at the joint anchor. | |
| float32 | GetReactionTorque () const |
| Get the reaction torque on body2. | |
| float32 | GetJointTranslation () const |
| Get the current joint translation, usually in meters. | |
| float32 | GetJointSpeed () const |
| Get the current joint translation speed, usually in meters per second. | |
| bool | IsLimitEnabled () const |
| Is the joint limit enabled? | |
| void | EnableLimit (bool flag) |
| Enable/disable the joint limit. | |
| float32 | GetLowerLimit () const |
| Get the lower joint limit, usually in meters. | |
| float32 | GetUpperLimit () const |
| Get the upper joint limit, usually in meters. | |
| void | SetLimits (float32 lower, float32 upper) |
| Set the joint limits, usually in meters. | |
| bool | IsMotorEnabled () const |
| Is the joint motor enabled? | |
| void | EnableMotor (bool flag) |
| Enable/disable the joint motor. | |
| void | SetMotorSpeed (float32 speed) |
| Set the motor speed, usually in meters per second. | |
| float32 | GetMotorSpeed () const |
| Get the motor speed, usually in meters per second. | |
| void | SetMaxMotorForce (float32 torque) |
| Set the maximum motor torque, usually in N. | |
| float32 | GetMotorForce () const |
| Get the current motor torque, usually in N. | |
This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
1.5.4