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

#include <b2_weld_joint.h>

Inheritance diagram for b2WeldJointDef:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

float damping
 The rotational damping in N*m*s. 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...
 
float referenceAngle
 The bodyB angle minus bodyA angle in the reference state (radians). More...
 
float stiffness
 
- 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...
 
b2JointUserData userData
 Use this to attach application specific data to your joints. 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.

Definition at line 32 of file b2_weld_joint.h.

Constructor & Destructor Documentation

◆ b2WeldJointDef()

b2WeldJointDef::b2WeldJointDef ( )
inline

Definition at line 34 of file b2_weld_joint.h.

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

Definition at line 41 of file b2_weld_joint.cpp.

Member Data Documentation

◆ damping

float b2WeldJointDef::damping

The rotational damping in N*m*s.

Definition at line 64 of file b2_weld_joint.h.

◆ localAnchorA

b2Vec2 b2WeldJointDef::localAnchorA

The local anchor point relative to bodyA's origin.

Definition at line 51 of file b2_weld_joint.h.

◆ localAnchorB

b2Vec2 b2WeldJointDef::localAnchorB

The local anchor point relative to bodyB's origin.

Definition at line 54 of file b2_weld_joint.h.

◆ referenceAngle

float b2WeldJointDef::referenceAngle

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

Definition at line 57 of file b2_weld_joint.h.

◆ stiffness

float b2WeldJointDef::stiffness

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

Definition at line 61 of file b2_weld_joint.h.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22