#include <b2_distance_joint.h>
Public Member Functions | |
b2DistanceJointDef () | |
void | Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchorA, const b2Vec2 &anchorB) |
![]() | |
b2JointDef () | |
Public Attributes | |
float | damping |
The linear damping in N*s/m. More... | |
float | length |
The rest length of this joint. Clamped to a stable minimum value. 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 | maxLength |
Maximum length. Must be greater than or equal to the minimum length. More... | |
float | minLength |
Minimum length. Clamped to a stable minimum value. More... | |
float | stiffness |
The linear stiffness in N/m. 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... | |
Distance joint definition. This requires defining an anchor point on both bodies and the non-zero distance 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 33 of file b2_distance_joint.h.
|
inline |
Definition at line 35 of file b2_distance_joint.h.
void b2DistanceJointDef::Initialize | ( | b2Body * | bodyA, |
b2Body * | bodyB, | ||
const b2Vec2 & | anchorA, | ||
const b2Vec2 & | anchorB | ||
) |
Initialize the bodies, anchors, and rest length using world space anchors. The minimum and maximum lengths are set to the rest length.
Definition at line 44 of file b2_distance_joint.cpp.
float b2DistanceJointDef::damping |
The linear damping in N*s/m.
Definition at line 71 of file b2_distance_joint.h.
float b2DistanceJointDef::length |
The rest length of this joint. Clamped to a stable minimum value.
Definition at line 59 of file b2_distance_joint.h.
b2Vec2 b2DistanceJointDef::localAnchorA |
The local anchor point relative to bodyA's origin.
Definition at line 53 of file b2_distance_joint.h.
b2Vec2 b2DistanceJointDef::localAnchorB |
The local anchor point relative to bodyB's origin.
Definition at line 56 of file b2_distance_joint.h.
float b2DistanceJointDef::maxLength |
Maximum length. Must be greater than or equal to the minimum length.
Definition at line 65 of file b2_distance_joint.h.
float b2DistanceJointDef::minLength |
Minimum length. Clamped to a stable minimum value.
Definition at line 62 of file b2_distance_joint.h.
float b2DistanceJointDef::stiffness |
The linear stiffness in N/m.
Definition at line 68 of file b2_distance_joint.h.