Torque2D Reference
Public Member Functions | Public Attributes | List of all members
b2WeldJointDef Struct Reference

#include <b2WeldJoint.h>

+ Inheritance diagram for b2WeldJointDef:

Public Member Functions

 b2WeldJointDef ()
 
void Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor)
 
- Public Member Functions inherited from b2JointDef
 b2JointDef ()
 

Public Attributes

b2Vec2 localAnchorA
 The local anchor point relative to bodyA's origin. More...
 
b2Vec2 localAnchorB
 The local anchor point relative to bodyB's origin. More...
 
float32 referenceAngle
 The bodyB angle minus bodyA angle in the reference state (radians). More...
 
float32 frequencyHz
 
float32 dampingRatio
 The damping ratio. 0 = no damping, 1 = critical damping. More...
 
- Public Attributes inherited from b2JointDef
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...
 
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...
 

Detailed Description

Weld joint definition. You need to specify local anchor points where they are attached and the relative body angle. The position of the anchor points is important for computing the reaction torque.

Constructor & Destructor Documentation

b2WeldJointDef ( )
inline

Member Function Documentation

void Initialize ( b2Body bodyA,
b2Body bodyB,
const b2Vec2 anchor 
)

Initialize the bodies, anchors, and reference angle using a world anchor point.

Member Data Documentation

float32 dampingRatio

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

float32 frequencyHz

The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.

b2Vec2 localAnchorA

The local anchor point relative to bodyA's origin.

b2Vec2 localAnchorB

The local anchor point relative to bodyB's origin.

float32 referenceAngle

The bodyB angle minus bodyA angle in the reference state (radians).


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