Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Public Member Functions | Public Attributes | List of all members
box2d::WeldJointDef Struct Reference

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. More...

#include <WeldJoint.hpp>

Inheritance diagram for box2d::WeldJointDef:
box2d::JointDef

Public Member Functions

constexpr WeldJointDef () noexcept
 
void Initialize (Body *bodyA, Body *bodyB, const Length2D anchor)
 Initialize the bodies, anchors, and reference angle using a world anchor point. More...
 
- Public Member Functions inherited from box2d::JointDef
 JointDef ()=delete
 Deleted default constructor for abstract base class. More...
 
constexpr JointDef (JointType t) noexcept
 
constexpr JointDef (JointType t, Body *bA, Body *bB, bool cc=false, void *u=nullptr) noexcept
 

Public Attributes

Length2D localAnchorA = Vec2_zero * Meter
 The local anchor point relative to bodyA's origin. More...
 
Length2D localAnchorB = Vec2_zero * Meter
 The local anchor point relative to bodyB's origin. More...
 
Angle referenceAngle = Angle{0}
 The bodyB angle minus bodyA angle in the reference state (radians). More...
 
Frequency frequencyHz = Frequency{0}
 The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0. More...
 
RealNum dampingRatio = 0
 The damping ratio. 0 = no damping, 1 = critical damping. More...
 
- Public Attributes inherited from box2d::JointDef
const JointType type
 The joint type is set automatically for concrete joint types. More...
 
BodybodyA = nullptr
 The first attached body. More...
 
BodybodyB = nullptr
 The second attached body. More...
 
bool collideConnected = false
 Set this flag to true if the attached bodies should collide. More...
 
void * userData = nullptr
 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.

Constructor & Destructor Documentation

◆ WeldJointDef()

constexpr box2d::WeldJointDef::WeldJointDef ( )
inlinenoexcept

Member Function Documentation

◆ Initialize()

void WeldJointDef::Initialize ( Body bodyA,
Body bodyB,
const Length2D  anchor 
)

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

Member Data Documentation

◆ dampingRatio

RealNum box2d::WeldJointDef::dampingRatio = 0

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

◆ frequencyHz

Frequency box2d::WeldJointDef::frequencyHz = Frequency{0}

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

◆ localAnchorA

Length2D box2d::WeldJointDef::localAnchorA = Vec2_zero * Meter

The local anchor point relative to bodyA's origin.

◆ localAnchorB

Length2D box2d::WeldJointDef::localAnchorB = Vec2_zero * Meter

The local anchor point relative to bodyB's origin.

◆ referenceAngle

Angle box2d::WeldJointDef::referenceAngle = Angle{0}

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


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