Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
b2Joint Class Reference

#include <b2Joint.h>

Inheritance diagram for b2Joint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void Dump ()
 Dump this joint to the log file.
virtual b2Vec2 GetAnchorA () const =0
 Get the anchor point on bodyA in world coordinates.
virtual b2Vec2 GetAnchorB () const =0
 Get the anchor point on bodyB in world coordinates.
b2BodyGetBodyA ()
 Get the first body attached to this joint.
b2BodyGetBodyB ()
 Get the second body attached to this joint.
bool GetCollideConnected () const
b2JointGetNext ()
 Get the next joint the world joint list.
const b2JointGetNext () const
virtual b2Vec2 GetReactionForce (float32 inv_dt) const =0
 Get the reaction force on bodyB at the joint anchor in Newtons.
virtual float32 GetReactionTorque (float32 inv_dt) const =0
 Get the reaction torque on bodyB in N*m.
b2JointType GetType () const
 Get the type of the concrete joint.
void * GetUserData () const
 Get the user data pointer.
bool IsActive () const
 Short-cut function to determine if either body is inactive.
void SetUserData (void *data)
 Set the user data pointer.
virtual void ShiftOrigin (const b2Vec2 &newOrigin)
 Shift the origin for any points stored in world coordinates.

Protected Member Functions

 b2Joint (const b2JointDef *def)
virtual void InitVelocityConstraints (const b2SolverData &data)=0
virtual bool SolvePositionConstraints (const b2SolverData &data)=0
virtual void SolveVelocityConstraints (const b2SolverData &data)=0
virtual ~b2Joint ()

Static Protected Member Functions

static b2JointCreate (const b2JointDef *def, b2BlockAllocator *allocator)
static void Destroy (b2Joint *joint, b2BlockAllocator *allocator)

Protected Attributes

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
void * m_userData

Friends

class b2Body
class b2GearJoint
class b2Island
class b2World

Detailed Description

The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.

Definition at line 103 of file b2Joint.h.


Constructor & Destructor Documentation

b2Joint::b2Joint ( const b2JointDef def) [protected]

Definition at line 183 of file b2Joint.cpp.

virtual b2Joint::~b2Joint ( ) [inline, protected, virtual]

Definition at line 162 of file b2Joint.h.


Member Function Documentation

b2Joint * b2Joint::Create ( const b2JointDef def,
b2BlockAllocator allocator 
) [static, protected]

Definition at line 37 of file b2Joint.cpp.

void b2Joint::Destroy ( b2Joint joint,
b2BlockAllocator allocator 
) [static, protected]

Definition at line 128 of file b2Joint.cpp.

virtual void b2Joint::Dump ( ) [inline, virtual]

Dump this joint to the log file.

Reimplemented in b2RevoluteJoint, b2PrismaticJoint, b2WheelJoint, b2PulleyJoint, b2DistanceJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, b2RopeJoint, and b2GearJoint.

Definition at line 147 of file b2Joint.h.

virtual b2Vec2 b2Joint::GetAnchorA ( ) const [pure virtual]
virtual b2Vec2 b2Joint::GetAnchorB ( ) const [pure virtual]
b2Body * b2Joint::GetBodyA ( ) [inline]

Get the first body attached to this joint.

Definition at line 191 of file b2Joint.h.

b2Body * b2Joint::GetBodyB ( ) [inline]

Get the second body attached to this joint.

Definition at line 196 of file b2Joint.h.

bool b2Joint::GetCollideConnected ( ) const [inline]

Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap.

Definition at line 221 of file b2Joint.h.

b2Joint * b2Joint::GetNext ( ) [inline]

Get the next joint the world joint list.

Definition at line 201 of file b2Joint.h.

const b2Joint * b2Joint::GetNext ( ) const [inline]

Definition at line 206 of file b2Joint.h.

virtual b2Vec2 b2Joint::GetReactionForce ( float32  inv_dt) const [pure virtual]

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

Implemented in b2RevoluteJoint, b2PrismaticJoint, b2PulleyJoint, b2WheelJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2RopeJoint, b2GearJoint, and b2FrictionJoint.

virtual float32 b2Joint::GetReactionTorque ( float32  inv_dt) const [pure virtual]
b2JointType b2Joint::GetType ( ) const [inline]

Get the type of the concrete joint.

Definition at line 186 of file b2Joint.h.

void * b2Joint::GetUserData ( ) const [inline]

Get the user data pointer.

Definition at line 211 of file b2Joint.h.

virtual void b2Joint::InitVelocityConstraints ( const b2SolverData data) [protected, pure virtual]
bool b2Joint::IsActive ( ) const

Short-cut function to determine if either body is inactive.

Definition at line 208 of file b2Joint.cpp.

void b2Joint::SetUserData ( void *  data) [inline]

Set the user data pointer.

Definition at line 216 of file b2Joint.h.

virtual void b2Joint::ShiftOrigin ( const b2Vec2 newOrigin) [inline, virtual]

Shift the origin for any points stored in world coordinates.

Reimplemented in b2PulleyJoint, and b2MouseJoint.

Definition at line 150 of file b2Joint.h.

virtual bool b2Joint::SolvePositionConstraints ( const b2SolverData data) [protected, pure virtual]
virtual void b2Joint::SolveVelocityConstraints ( const b2SolverData data) [protected, pure virtual]

Friends And Related Function Documentation

friend class b2Body [friend]

Definition at line 154 of file b2Joint.h.

friend class b2GearJoint [friend]

Reimplemented in b2RevoluteJoint, and b2PrismaticJoint.

Definition at line 156 of file b2Joint.h.

friend class b2Island [friend]

Definition at line 155 of file b2Joint.h.

friend class b2World [friend]

Definition at line 153 of file b2Joint.h.


Member Data Documentation

b2Body* b2Joint::m_bodyA [protected]

Definition at line 175 of file b2Joint.h.

b2Body* b2Joint::m_bodyB [protected]

Definition at line 176 of file b2Joint.h.

bool b2Joint::m_collideConnected [protected]

Definition at line 181 of file b2Joint.h.

Definition at line 173 of file b2Joint.h.

Definition at line 174 of file b2Joint.h.

int32 b2Joint::m_index [protected]

Definition at line 178 of file b2Joint.h.

bool b2Joint::m_islandFlag [protected]

Definition at line 180 of file b2Joint.h.

b2Joint* b2Joint::m_next [protected]

Definition at line 172 of file b2Joint.h.

b2Joint* b2Joint::m_prev [protected]

Definition at line 171 of file b2Joint.h.

Definition at line 170 of file b2Joint.h.

void* b2Joint::m_userData [protected]

Definition at line 183 of file b2Joint.h.


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


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 22:08:35