Box2D: b2RevoluteJoint Class Reference

Box2D

b2RevoluteJoint Class Reference

A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. More...

Inheritance diagram for b2RevoluteJoint:

b2Joint

List of all members.

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.

Detailed Description

A revolute joint constrains to bodies to share a common point while they are free to rotate about the point.

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.


The documentation for this class was generated from the following files:
  • b2RevoluteJoint.h
  • b2RevoluteJoint.cpp

Generated on Sun Apr 13 15:21:27 2008 for Box2D by  doxygen 1.5.4