Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
b2WeldJoint Class Reference

#include <b2_weld_joint.h>

Inheritance diagram for b2WeldJoint:
Inheritance graph
[legend]

Public Member Functions

void Dump () override
 Dump to b2Log. More...
 
b2Vec2 GetAnchorA () const override
 Get the anchor point on bodyA in world coordinates. More...
 
b2Vec2 GetAnchorB () const override
 Get the anchor point on bodyB in world coordinates. More...
 
float GetDamping () const
 
const b2Vec2GetLocalAnchorA () const
 The local anchor point relative to bodyA's origin. More...
 
const b2Vec2GetLocalAnchorB () const
 The local anchor point relative to bodyB's origin. More...
 
b2Vec2 GetReactionForce (float inv_dt) const override
 Get the reaction force on bodyB at the joint anchor in Newtons. More...
 
float GetReactionTorque (float inv_dt) const override
 Get the reaction torque on bodyB in N*m. More...
 
float GetReferenceAngle () const
 Get the reference angle. More...
 
float GetStiffness () const
 
void SetDamping (float damping)
 Set/get damping in N*m*s. More...
 
void SetStiffness (float hz)
 Set/get stiffness in N*m. More...
 
- Public Member Functions inherited from b2Joint
virtual void Draw (b2Draw *draw) const
 Debug draw this joint. More...
 
b2BodyGetBodyA ()
 Get the first body attached to this joint. More...
 
b2BodyGetBodyB ()
 Get the second body attached to this joint. More...
 
bool GetCollideConnected () const
 
b2JointGetNext ()
 Get the next joint the world joint list. More...
 
const b2JointGetNext () const
 
b2JointType GetType () const
 Get the type of the concrete joint. More...
 
b2JointUserDataGetUserData ()
 Get the user data pointer. More...
 
bool IsEnabled () const
 Short-cut function to determine if either body is enabled. More...
 
virtual void ShiftOrigin (const b2Vec2 &newOrigin)
 Shift the origin for any points stored in world coordinates. More...
 

Protected Member Functions

 b2WeldJoint (const b2WeldJointDef *def)
 
void InitVelocityConstraints (const b2SolverData &data) override
 
bool SolvePositionConstraints (const b2SolverData &data) override
 
void SolveVelocityConstraints (const b2SolverData &data) override
 
- Protected Member Functions inherited from b2Joint
 b2Joint (const b2JointDef *def)
 
virtual ~b2Joint ()
 

Protected Attributes

float m_bias
 
float m_damping
 
float m_gamma
 
b2Vec3 m_impulse
 
int32 m_indexA
 
int32 m_indexB
 
float m_invIA
 
float m_invIB
 
float m_invMassA
 
float m_invMassB
 
b2Vec2 m_localAnchorA
 
b2Vec2 m_localAnchorB
 
b2Vec2 m_localCenterA
 
b2Vec2 m_localCenterB
 
b2Mat33 m_mass
 
b2Vec2 m_rA
 
b2Vec2 m_rB
 
float m_referenceAngle
 
float m_stiffness
 
- Protected Attributes inherited from b2Joint
b2Bodym_bodyA
 
b2Bodym_bodyB
 
bool m_collideConnected
 
b2JointEdge m_edgeA
 
b2JointEdge m_edgeB
 
int32 m_index
 
bool m_islandFlag
 
b2Jointm_next
 
b2Jointm_prev
 
b2JointType m_type
 
b2JointUserData m_userData
 

Friends

class b2Joint
 

Additional Inherited Members

- Static Protected Member Functions inherited from b2Joint
static b2JointCreate (const b2JointDef *def, b2BlockAllocator *allocator)
 
static void Destroy (b2Joint *joint, b2BlockAllocator *allocator)
 

Detailed Description

A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.

Definition at line 69 of file b2_weld_joint.h.

Constructor & Destructor Documentation

◆ b2WeldJoint()

b2WeldJoint::b2WeldJoint ( const b2WeldJointDef def)
protected

Definition at line 50 of file b2_weld_joint.cpp.

Member Function Documentation

◆ Dump()

void b2WeldJoint::Dump ( )
overridevirtual

Dump to b2Log.

Reimplemented from b2Joint.

Definition at line 329 of file b2_weld_joint.cpp.

◆ GetAnchorA()

b2Vec2 b2WeldJoint::GetAnchorA ( ) const
overridevirtual

Get the anchor point on bodyA in world coordinates.

Implements b2Joint.

Definition at line 308 of file b2_weld_joint.cpp.

◆ GetAnchorB()

b2Vec2 b2WeldJoint::GetAnchorB ( ) const
overridevirtual

Get the anchor point on bodyB in world coordinates.

Implements b2Joint.

Definition at line 313 of file b2_weld_joint.cpp.

◆ GetDamping()

float b2WeldJoint::GetDamping ( ) const
inline

Definition at line 93 of file b2_weld_joint.h.

◆ GetLocalAnchorA()

const b2Vec2& b2WeldJoint::GetLocalAnchorA ( ) const
inline

The local anchor point relative to bodyA's origin.

Definition at line 79 of file b2_weld_joint.h.

◆ GetLocalAnchorB()

const b2Vec2& b2WeldJoint::GetLocalAnchorB ( ) const
inline

The local anchor point relative to bodyB's origin.

Definition at line 82 of file b2_weld_joint.h.

◆ GetReactionForce()

b2Vec2 b2WeldJoint::GetReactionForce ( float  inv_dt) const
overridevirtual

Get the reaction force on bodyB at the joint anchor in Newtons.

Implements b2Joint.

Definition at line 318 of file b2_weld_joint.cpp.

◆ GetReactionTorque()

float b2WeldJoint::GetReactionTorque ( float  inv_dt) const
overridevirtual

Get the reaction torque on bodyB in N*m.

Implements b2Joint.

Definition at line 324 of file b2_weld_joint.cpp.

◆ GetReferenceAngle()

float b2WeldJoint::GetReferenceAngle ( ) const
inline

Get the reference angle.

Definition at line 85 of file b2_weld_joint.h.

◆ GetStiffness()

float b2WeldJoint::GetStiffness ( ) const
inline

Definition at line 89 of file b2_weld_joint.h.

◆ InitVelocityConstraints()

void b2WeldJoint::InitVelocityConstraints ( const b2SolverData data)
overrideprotectedvirtual

Implements b2Joint.

Definition at line 62 of file b2_weld_joint.cpp.

◆ SetDamping()

void b2WeldJoint::SetDamping ( float  damping)
inline

Set/get damping in N*m*s.

Definition at line 92 of file b2_weld_joint.h.

◆ SetStiffness()

void b2WeldJoint::SetStiffness ( float  hz)
inline

Set/get stiffness in N*m.

Definition at line 88 of file b2_weld_joint.h.

◆ SolvePositionConstraints()

bool b2WeldJoint::SolvePositionConstraints ( const b2SolverData data)
overrideprotectedvirtual

Implements b2Joint.

Definition at line 227 of file b2_weld_joint.cpp.

◆ SolveVelocityConstraints()

void b2WeldJoint::SolveVelocityConstraints ( const b2SolverData data)
overrideprotectedvirtual

Implements b2Joint.

Definition at line 169 of file b2_weld_joint.cpp.

Friends And Related Function Documentation

◆ b2Joint

friend class b2Joint
friend

Definition at line 100 of file b2_weld_joint.h.

Member Data Documentation

◆ m_bias

float b2WeldJoint::m_bias
protected

Definition at line 110 of file b2_weld_joint.h.

◆ m_damping

float b2WeldJoint::m_damping
protected

Definition at line 109 of file b2_weld_joint.h.

◆ m_gamma

float b2WeldJoint::m_gamma
protected

Definition at line 116 of file b2_weld_joint.h.

◆ m_impulse

b2Vec3 b2WeldJoint::m_impulse
protected

Definition at line 117 of file b2_weld_joint.h.

◆ m_indexA

int32 b2WeldJoint::m_indexA
protected

Definition at line 120 of file b2_weld_joint.h.

◆ m_indexB

int32 b2WeldJoint::m_indexB
protected

Definition at line 121 of file b2_weld_joint.h.

◆ m_invIA

float b2WeldJoint::m_invIA
protected

Definition at line 128 of file b2_weld_joint.h.

◆ m_invIB

float b2WeldJoint::m_invIB
protected

Definition at line 129 of file b2_weld_joint.h.

◆ m_invMassA

float b2WeldJoint::m_invMassA
protected

Definition at line 126 of file b2_weld_joint.h.

◆ m_invMassB

float b2WeldJoint::m_invMassB
protected

Definition at line 127 of file b2_weld_joint.h.

◆ m_localAnchorA

b2Vec2 b2WeldJoint::m_localAnchorA
protected

Definition at line 113 of file b2_weld_joint.h.

◆ m_localAnchorB

b2Vec2 b2WeldJoint::m_localAnchorB
protected

Definition at line 114 of file b2_weld_joint.h.

◆ m_localCenterA

b2Vec2 b2WeldJoint::m_localCenterA
protected

Definition at line 124 of file b2_weld_joint.h.

◆ m_localCenterB

b2Vec2 b2WeldJoint::m_localCenterB
protected

Definition at line 125 of file b2_weld_joint.h.

◆ m_mass

b2Mat33 b2WeldJoint::m_mass
protected

Definition at line 130 of file b2_weld_joint.h.

◆ m_rA

b2Vec2 b2WeldJoint::m_rA
protected

Definition at line 122 of file b2_weld_joint.h.

◆ m_rB

b2Vec2 b2WeldJoint::m_rB
protected

Definition at line 123 of file b2_weld_joint.h.

◆ m_referenceAngle

float b2WeldJoint::m_referenceAngle
protected

Definition at line 115 of file b2_weld_joint.h.

◆ m_stiffness

float b2WeldJoint::m_stiffness
protected

Definition at line 108 of file b2_weld_joint.h.


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


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