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

#include <b2WeldJoint.h>

Inheritance diagram for b2WeldJoint:
Inheritance graph
[legend]

Public Member Functions

void Dump ()
 Dump to b2Log. More...
 
b2Vec2 GetAnchorA () const
 Get the anchor point on bodyA in world coordinates. More...
 
b2Vec2 GetAnchorB () const
 Get the anchor point on bodyB in world coordinates. More...
 
float32 GetDampingRatio () const
 
float32 GetFrequency () 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 (float32 inv_dt) const
 Get the reaction force on bodyB at the joint anchor in Newtons. More...
 
float32 GetReactionTorque (float32 inv_dt) const
 Get the reaction torque on bodyB in N*m. More...
 
float32 GetReferenceAngle () const
 Get the reference angle. More...
 
void SetDampingRatio (float32 ratio)
 Set/get damping ratio. More...
 
void SetFrequency (float32 hz)
 Set/get frequency in Hz. More...
 
- Public Member Functions inherited from b2Joint
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...
 
voidGetUserData () const
 Get the user data pointer. More...
 
bool IsActive () const
 Short-cut function to determine if either body is inactive. More...
 
void SetUserData (void *data)
 Set the user data pointer. 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)
 
bool SolvePositionConstraints (const b2SolverData &data)
 
void SolveVelocityConstraints (const b2SolverData &data)
 
- Protected Member Functions inherited from b2Joint
 b2Joint (const b2JointDef *def)
 
virtual ~b2Joint ()
 

Protected Attributes

float32 m_bias
 
float32 m_dampingRatio
 
float32 m_frequencyHz
 
float32 m_gamma
 
b2Vec3 m_impulse
 
int32 m_indexA
 
int32 m_indexB
 
float32 m_invIA
 
float32 m_invIB
 
float32 m_invMassA
 
float32 m_invMassB
 
b2Vec2 m_localAnchorA
 
b2Vec2 m_localAnchorB
 
b2Vec2 m_localCenterA
 
b2Vec2 m_localCenterB
 
b2Mat33 m_mass
 
b2Vec2 m_rA
 
b2Vec2 m_rB
 
float32 m_referenceAngle
 
- 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
 
voidm_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 62 of file b2WeldJoint.h.

Constructor & Destructor Documentation

b2WeldJoint::b2WeldJoint ( const b2WeldJointDef def)
protected

Definition at line 46 of file b2WeldJoint.cpp.

Member Function Documentation

void b2WeldJoint::Dump ( )
virtual

Dump to b2Log.

Reimplemented from b2Joint.

Definition at line 329 of file b2WeldJoint.cpp.

b2Vec2 b2WeldJoint::GetAnchorA ( ) const
virtual

Get the anchor point on bodyA in world coordinates.

Implements b2Joint.

Definition at line 308 of file b2WeldJoint.cpp.

b2Vec2 b2WeldJoint::GetAnchorB ( ) const
virtual

Get the anchor point on bodyB in world coordinates.

Implements b2Joint.

Definition at line 313 of file b2WeldJoint.cpp.

float32 b2WeldJoint::GetDampingRatio ( ) const
inline

Definition at line 86 of file b2WeldJoint.h.

float32 b2WeldJoint::GetFrequency ( ) const
inline

Definition at line 82 of file b2WeldJoint.h.

const b2Vec2& b2WeldJoint::GetLocalAnchorA ( ) const
inline

The local anchor point relative to bodyA's origin.

Definition at line 72 of file b2WeldJoint.h.

const b2Vec2& b2WeldJoint::GetLocalAnchorB ( ) const
inline

The local anchor point relative to bodyB's origin.

Definition at line 75 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::GetReactionForce ( float32  inv_dt) const
virtual

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

Implements b2Joint.

Definition at line 318 of file b2WeldJoint.cpp.

float32 b2WeldJoint::GetReactionTorque ( float32  inv_dt) const
virtual

Get the reaction torque on bodyB in N*m.

Implements b2Joint.

Definition at line 324 of file b2WeldJoint.cpp.

float32 b2WeldJoint::GetReferenceAngle ( ) const
inline

Get the reference angle.

Definition at line 78 of file b2WeldJoint.h.

void b2WeldJoint::InitVelocityConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 58 of file b2WeldJoint.cpp.

void b2WeldJoint::SetDampingRatio ( float32  ratio)
inline

Set/get damping ratio.

Definition at line 85 of file b2WeldJoint.h.

void b2WeldJoint::SetFrequency ( float32  hz)
inline

Set/get frequency in Hz.

Definition at line 81 of file b2WeldJoint.h.

bool b2WeldJoint::SolvePositionConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 227 of file b2WeldJoint.cpp.

void b2WeldJoint::SolveVelocityConstraints ( const b2SolverData data)
protectedvirtual

Implements b2Joint.

Definition at line 169 of file b2WeldJoint.cpp.

Friends And Related Function Documentation

friend class b2Joint
friend

Definition at line 93 of file b2WeldJoint.h.

Member Data Documentation

float32 b2WeldJoint::m_bias
protected

Definition at line 103 of file b2WeldJoint.h.

float32 b2WeldJoint::m_dampingRatio
protected

Definition at line 102 of file b2WeldJoint.h.

float32 b2WeldJoint::m_frequencyHz
protected

Definition at line 101 of file b2WeldJoint.h.

float32 b2WeldJoint::m_gamma
protected

Definition at line 109 of file b2WeldJoint.h.

b2Vec3 b2WeldJoint::m_impulse
protected

Definition at line 110 of file b2WeldJoint.h.

int32 b2WeldJoint::m_indexA
protected

Definition at line 113 of file b2WeldJoint.h.

int32 b2WeldJoint::m_indexB
protected

Definition at line 114 of file b2WeldJoint.h.

float32 b2WeldJoint::m_invIA
protected

Definition at line 121 of file b2WeldJoint.h.

float32 b2WeldJoint::m_invIB
protected

Definition at line 122 of file b2WeldJoint.h.

float32 b2WeldJoint::m_invMassA
protected

Definition at line 119 of file b2WeldJoint.h.

float32 b2WeldJoint::m_invMassB
protected

Definition at line 120 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::m_localAnchorA
protected

Definition at line 106 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::m_localAnchorB
protected

Definition at line 107 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::m_localCenterA
protected

Definition at line 117 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::m_localCenterB
protected

Definition at line 118 of file b2WeldJoint.h.

b2Mat33 b2WeldJoint::m_mass
protected

Definition at line 123 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::m_rA
protected

Definition at line 115 of file b2WeldJoint.h.

b2Vec2 b2WeldJoint::m_rB
protected

Definition at line 116 of file b2WeldJoint.h.

float32 b2WeldJoint::m_referenceAngle
protected

Definition at line 108 of file b2WeldJoint.h.


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


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:52