Go to the documentation of this file.
79 collideConnected =
false;
100 float frequencyHertz,
float dampingRatio,
105 float frequencyHertz,
float dampingRatio,
124 virtual b2Vec2 GetAnchorA()
const = 0;
127 virtual b2Vec2 GetAnchorB()
const = 0;
130 virtual b2Vec2 GetReactionForce(
float inv_dt)
const = 0;
133 virtual float GetReactionTorque(
float inv_dt)
const = 0;
137 const b2Joint* GetNext()
const;
143 bool IsEnabled()
const;
148 bool GetCollideConnected()
const;
151 virtual void Dump() {
b2Dump(
"// Dump is not supported for this joint type.\n"); }
157 virtual void Draw(
b2Draw* draw)
const;
b2Joint * GetNext()
Get the next joint the world joint list.
B2_API void b2LinearStiffness(float &stiffness, float &damping, float frequencyHertz, float dampingRatio, const b2Body *bodyA, const b2Body *bodyB)
Utility to compute linear stiffness values from frequency and damping ratio.
b2JointType GetType() const
Get the type of the concrete joint.
b2Body * GetBodyB()
Get the second body attached to this joint.
b2Body * other
provides quick access to the other body attached.
void InitVelocityConstraints(const b2SolverData &data) override
static void Destroy(b2Joint *joint, b2BlockAllocator *allocator)
A rigid body. These are created via b2World::CreateBody.
void b2Dump(const char *string,...)
virtual void Dump()
Dump this joint to the log file.
B2_API void b2AngularStiffness(float &stiffness, float &damping, float frequencyHertz, float dampingRatio, const b2Body *bodyA, const b2Body *bodyB)
Utility to compute rotational stiffness values frequency and damping ratio.
b2Body * GetBodyA()
Get the first body attached to this joint.
bool GetCollideConnected() const
Joint definitions are used to construct joints.
This is an internal class.
You can define this to inject whatever data you want in b2Joint.
bool collideConnected
Set this flag to true if the attached bodies should collide.
void SolveVelocityConstraints(const b2SolverData &data) override
b2JointUserData userData
Use this to attach application specific data to your joints.
bool SolvePositionConstraints(const b2SolverData &data) override
b2JointEdge * prev
the previous joint edge in the body's joint list
b2JointEdge * next
the next joint edge in the body's joint list
b2JointUserData m_userData
b2JointType type
The joint type is set automatically for concrete joint types.
virtual void ShiftOrigin(const b2Vec2 &newOrigin)
Shift the origin for any points stored in world coordinates.
static b2Joint * Create(const b2JointDef *def, b2BlockAllocator *allocator)
b2JointUserData & GetUserData()
Get the user data pointer.
b2Body * bodyA
The first attached body.
b2Body * bodyB
The second attached body.
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:07