#include <b2_revolute_joint.h>
Public Member Functions | |
b2RevoluteJointDef () | |
void | Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor) |
![]() | |
b2JointDef () | |
Public Attributes | |
bool | enableLimit |
A flag to enable joint limits. More... | |
bool | enableMotor |
A flag to enable the joint motor. More... | |
b2Vec2 | localAnchorA |
The local anchor point relative to bodyA's origin. More... | |
b2Vec2 | localAnchorB |
The local anchor point relative to bodyB's origin. More... | |
float | lowerAngle |
The lower angle for the joint limit (radians). More... | |
float | maxMotorTorque |
float | motorSpeed |
The desired motor speed. Usually in radians per second. More... | |
float | referenceAngle |
The bodyB angle minus bodyA angle in the reference state (radians). More... | |
float | upperAngle |
The upper angle for the joint limit (radians). More... | |
![]() | |
b2Body * | bodyA |
The first attached body. More... | |
b2Body * | bodyB |
The second attached body. More... | |
bool | collideConnected |
Set this flag to true if the attached bodies should collide. More... | |
b2JointType | type |
The joint type is set automatically for concrete joint types. More... | |
b2JointUserData | userData |
Use this to attach application specific data to your joints. More... | |
Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because:
Definition at line 39 of file b2_revolute_joint.h.
|
inline |
Definition at line 41 of file b2_revolute_joint.h.
Initialize the bodies, anchors, and reference angle using a world anchor point.
Definition at line 41 of file b2_revolute_joint.cpp.
bool b2RevoluteJointDef::enableLimit |
A flag to enable joint limits.
Definition at line 69 of file b2_revolute_joint.h.
bool b2RevoluteJointDef::enableMotor |
A flag to enable the joint motor.
Definition at line 78 of file b2_revolute_joint.h.
b2Vec2 b2RevoluteJointDef::localAnchorA |
The local anchor point relative to bodyA's origin.
Definition at line 60 of file b2_revolute_joint.h.
b2Vec2 b2RevoluteJointDef::localAnchorB |
The local anchor point relative to bodyB's origin.
Definition at line 63 of file b2_revolute_joint.h.
float b2RevoluteJointDef::lowerAngle |
The lower angle for the joint limit (radians).
Definition at line 72 of file b2_revolute_joint.h.
float b2RevoluteJointDef::maxMotorTorque |
The maximum motor torque used to achieve the desired motor speed. Usually in N-m.
Definition at line 85 of file b2_revolute_joint.h.
float b2RevoluteJointDef::motorSpeed |
The desired motor speed. Usually in radians per second.
Definition at line 81 of file b2_revolute_joint.h.
float b2RevoluteJointDef::referenceAngle |
The bodyB angle minus bodyA angle in the reference state (radians).
Definition at line 66 of file b2_revolute_joint.h.
float b2RevoluteJointDef::upperAngle |
The upper angle for the joint limit (radians).
Definition at line 75 of file b2_revolute_joint.h.