
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 | GetJointAngle () const |
| Get the current joint angle in radians. | |
| float32 | GetJointSpeed () const |
| Get the current joint angle speed in radians 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 in radians. | |
| float32 | GetUpperLimit () const |
| Get the upper joint limit in radians. | |
| void | SetLimits (float32 lower, float32 upper) |
| Set the joint limits in radians. | |
| 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 in radians per second. | |
| float32 | GetMotorSpeed () const |
| Get the motor speed in radians per second. | |
| void | SetMaxMotorTorque (float32 torque) |
| Set the maximum motor torque, usually in N-m. | |
| float32 | GetMotorTorque () const |
| Get the current motor torque, usually in N-m. | |
The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
1.5.4