#include <b2DistanceJoint.h>
Public Member Functions | |
b2DistanceJointDef () | |
void | Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchorA, const b2Vec2 &anchorB) |
Public Attributes | |
float32 | dampingRatio |
The damping ratio. 0 = no damping, 1 = critical damping. | |
float32 | frequencyHz |
float32 | length |
The natural length between the anchor points. | |
b2Vec2 | localAnchorA |
The local anchor point relative to bodyA's origin. | |
b2Vec2 | localAnchorB |
The local anchor point relative to bodyB's origin. |
Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game.
Definition at line 30 of file b2DistanceJoint.h.
b2DistanceJointDef::b2DistanceJointDef | ( | ) | [inline] |
Definition at line 32 of file b2DistanceJoint.h.
void b2DistanceJointDef::Initialize | ( | b2Body * | bodyA, |
b2Body * | bodyB, | ||
const b2Vec2 & | anchorA, | ||
const b2Vec2 & | anchorB | ||
) |
Initialize the bodies, anchors, and length using the world anchors.
Definition at line 38 of file b2DistanceJoint.cpp.
The damping ratio. 0 = no damping, 1 = critical damping.
Definition at line 61 of file b2DistanceJoint.h.
The mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Definition at line 58 of file b2DistanceJoint.h.
The natural length between the anchor points.
Definition at line 54 of file b2DistanceJoint.h.
The local anchor point relative to bodyA's origin.
Definition at line 48 of file b2DistanceJoint.h.
The local anchor point relative to bodyB's origin.
Definition at line 51 of file b2DistanceJoint.h.