Box2D 2.4.1
A 2D physics engine for games
Loading...
Searching...
No Matches
b2WeldJointDef Struct Reference

#include <b2_weld_joint.h>

Inheritance diagram for b2WeldJointDef:
b2JointDef

Public Member Functions

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

Public Attributes

b2Vec2 localAnchorA
 The local anchor point relative to bodyA's origin.
 
b2Vec2 localAnchorB
 The local anchor point relative to bodyB's origin.
 
float referenceAngle
 The bodyB angle minus bodyA angle in the reference state (radians).
 
float stiffness
 
float damping
 The rotational damping in N*m*s.
 
- Public Attributes inherited from b2JointDef
b2JointType type
 The joint type is set automatically for concrete joint types.
 
b2JointUserData userData
 Use this to attach application specific data to your joints.
 
b2BodybodyA
 The first attached body.
 
b2BodybodyB
 The second attached body.
 
bool collideConnected
 Set this flag to true if the attached bodies should collide.
 

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

◆ Initialize()

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

Initialize the bodies, anchors, reference angle, stiffness, and damping.

Parameters
bodyAthe first body connected by this joint
bodyBthe second body connected by this joint
anchorthe point of connection in world coordinates

Member Data Documentation

◆ stiffness

float b2WeldJointDef::stiffness

The rotational stiffness in N*m Disable softness with a value of 0


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