Box2D  2.2.1
Box2D API Reference for Kobold2D developers
b2WeldJointDef Struct Reference

#include <b2WeldJoint.h>

Inheritance diagram for b2WeldJointDef:
Collaboration diagram for b2WeldJointDef:

List of all members.

Public Member Functions

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

Public Attributes

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).
float32 frequencyHz
float32 dampingRatio
 The damping ratio. 0 = no damping, 1 = critical damping.

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.


Member Function Documentation

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

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


Member Data Documentation

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

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

The local anchor point relative to bodyA's origin.

The local anchor point relative to bodyB's origin.

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


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