Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
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>
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... | |
![]() | |
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... | |
![]() | |
const JointType | type |
The joint type is set automatically for concrete joint types. More... | |
Body * | bodyA = nullptr |
The first attached body. More... | |
Body * | bodyB = 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... | |
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.
|
inlinenoexcept |
Initialize the bodies, anchors, and reference angle using a world anchor point.
RealNum box2d::WeldJointDef::dampingRatio = 0 |
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).