Box3D 0.1.0
A 3D physics engine for games
Loading...
Searching...
No Matches

A weld joint fully constrains the relative transform between two bodies while allowing for springiness. More...

Collaboration diagram for Weld Joint:

Data Structures

struct  b3WeldJointDef
 Weld joint definition Connects two bodies together rigidly. More...

Functions

b3JointId b3CreateWeldJoint (b3WorldId worldId, const b3WeldJointDef *def)
 Create a weld joint.
void b3WeldJoint_SetLinearHertz (b3JointId jointId, float hertz)
 Set the weld joint linear stiffness in Hertz. 0 is rigid.
float b3WeldJoint_GetLinearHertz (b3JointId jointId)
 Get the weld joint linear stiffness in Hertz.
void b3WeldJoint_SetLinearDampingRatio (b3JointId jointId, float dampingRatio)
 Set the weld joint linear damping ratio (non-dimensional).
float b3WeldJoint_GetLinearDampingRatio (b3JointId jointId)
 Get the weld joint linear damping ratio (non-dimensional).
void b3WeldJoint_SetAngularHertz (b3JointId jointId, float hertz)
 Set the weld joint angular stiffness in Hertz. 0 is rigid.
float b3WeldJoint_GetAngularHertz (b3JointId jointId)
 Get the weld joint angular stiffness in Hertz.
void b3WeldJoint_SetAngularDampingRatio (b3JointId jointId, float dampingRatio)
 Set weld joint angular damping ratio, non-dimensional.
float b3WeldJoint_GetAngularDampingRatio (b3JointId jointId)
 Get the weld joint angular damping ratio, non-dimensional.
b3WeldJointDef b3DefaultWeldJointDef (void)
 Use this to initialize your joint definition.

Detailed Description

A weld joint fully constrains the relative transform between two bodies while allowing for springiness.

A weld joint constrains the relative rotation and translation between two bodies. Both rotation and translation can have damped springs.

Note
The accuracy of weld joint is limited by the accuracy of the solver. Long chains of weld joints may flex.

Data Structure Documentation

◆ b3WeldJointDef

struct b3WeldJointDef

Weld joint definition Connects two bodies together rigidly.

This constraint provides springs to mimic soft-body simulation.

Note
The approximate solver in Box3D cannot hold many bodies together rigidly
Collaboration diagram for b3WeldJointDef:
Data Fields
float angularDampingRatio Linear damping ratio, non-dimensional. Use 1 for critical damping.
float angularHertz Angular stiffness as Hertz (cycles per second). Use zero for maximum stiffness.
b3JointDef base Base joint definition.
float linearDampingRatio Linear damping ratio, non-dimensional. Use 1 for critical damping.
float linearHertz Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness.

Function Documentation

◆ b3CreateWeldJoint()

b3JointId b3CreateWeldJoint ( b3WorldId worldId,
const b3WeldJointDef * def )

Create a weld joint.

See also
b3WeldJointDef for details