Public Member Functions | Public Attributes | List of all members
b2DistanceJointDef Struct Reference

#include <b2DistanceJoint.h>

Inheritance diagram for b2DistanceJointDef:
Inheritance graph
[legend]

Public Member Functions

 b2DistanceJointDef ()
 
void Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchorA, const b2Vec2 &anchorB)
 
- Public Member Functions inherited from b2JointDef
 b2JointDef ()
 

Public Attributes

float32 dampingRatio
 The damping ratio. 0 = no damping, 1 = critical damping. More...
 
float32 frequencyHz
 
float32 length
 The natural length between the anchor points. 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...
 
- Public Attributes inherited from b2JointDef
b2BodybodyA
 The first attached body. More...
 
b2BodybodyB
 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...
 
void * userData
 Use this to attach application specific data to your joints. More...
 

Detailed Description

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.

Warning
Do not use a zero or short length.

Definition at line 30 of file b2DistanceJoint.h.

Constructor & Destructor Documentation

b2DistanceJointDef::b2DistanceJointDef ( )
inline

Definition at line 32 of file b2DistanceJoint.h.

Member Function Documentation

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.

Member Data Documentation

float32 b2DistanceJointDef::dampingRatio

The damping ratio. 0 = no damping, 1 = critical damping.

Definition at line 61 of file b2DistanceJoint.h.

float32 b2DistanceJointDef::frequencyHz

The mass-spring-damper frequency in Hertz. A value of 0 disables softness.

Definition at line 58 of file b2DistanceJoint.h.

float32 b2DistanceJointDef::length

The natural length between the anchor points.

Definition at line 54 of file b2DistanceJoint.h.

b2Vec2 b2DistanceJointDef::localAnchorA

The local anchor point relative to bodyA's origin.

Definition at line 48 of file b2DistanceJoint.h.

b2Vec2 b2DistanceJointDef::localAnchorB

The local anchor point relative to bodyB's origin.

Definition at line 51 of file b2DistanceJoint.h.


The documentation for this struct was generated from the following files:


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 19:36:40