#include <b2PrismaticJoint.h>
Public Member Functions | |
b2PrismaticJointDef () | |
void | Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis) |
Public Attributes | |
bool | enableLimit |
Enable/disable the joint limit. | |
bool | enableMotor |
Enable/disable the joint motor. | |
b2Vec2 | localAnchorA |
The local anchor point relative to bodyA's origin. | |
b2Vec2 | localAnchorB |
The local anchor point relative to bodyB's origin. | |
b2Vec2 | localAxisA |
The local translation unit axis in bodyA. | |
float32 | lowerTranslation |
The lower translation limit, usually in meters. | |
float32 | maxMotorForce |
The maximum motor torque, usually in N-m. | |
float32 | motorSpeed |
The desired motor speed in radians per second. | |
float32 | referenceAngle |
The constrained angle between the bodies: bodyB_angle - bodyA_angle. | |
float32 | upperTranslation |
The upper translation limit, usually in meters. |
Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
Definition at line 30 of file b2PrismaticJoint.h.
b2PrismaticJointDef::b2PrismaticJointDef | ( | ) | [inline] |
Definition at line 32 of file b2PrismaticJoint.h.
void b2PrismaticJointDef::Initialize | ( | b2Body * | bodyA, |
b2Body * | bodyB, | ||
const b2Vec2 & | anchor, | ||
const b2Vec2 & | axis | ||
) |
Initialize the bodies, anchors, axis, and reference angle using the world anchor and unit world axis.
Definition at line 90 of file b2PrismaticJoint.cpp.
Enable/disable the joint limit.
Definition at line 64 of file b2PrismaticJoint.h.
Enable/disable the joint motor.
Definition at line 73 of file b2PrismaticJoint.h.
The local anchor point relative to bodyA's origin.
Definition at line 52 of file b2PrismaticJoint.h.
The local anchor point relative to bodyB's origin.
Definition at line 55 of file b2PrismaticJoint.h.
The local translation unit axis in bodyA.
Definition at line 58 of file b2PrismaticJoint.h.
The lower translation limit, usually in meters.
Definition at line 67 of file b2PrismaticJoint.h.
The maximum motor torque, usually in N-m.
Definition at line 76 of file b2PrismaticJoint.h.
The desired motor speed in radians per second.
Definition at line 79 of file b2PrismaticJoint.h.
The constrained angle between the bodies: bodyB_angle - bodyA_angle.
Definition at line 61 of file b2PrismaticJoint.h.
The upper translation limit, usually in meters.
Definition at line 70 of file b2PrismaticJoint.h.