b2Joint Class Reference

#include <b2Joint.h>

Inheritance diagram for b2Joint:
b2DistanceJoint b2FrictionJoint b2GearJoint b2LineJoint b2MouseJoint b2PrismaticJoint b2PulleyJoint b2RevoluteJoint b2WeldJoint

List of all members.

Public Member Functions

b2JointType GetType () const
 Get the type of the concrete joint.
b2BodyGetBodyA ()
 Get the first body attached to this joint.
b2BodyGetBodyB ()
 Get the second body attached to this joint.
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.
virtual b2Vec2 GetReactionForce (float32 inv_dt) const =0
 Get the reaction force on body2 at the joint anchor in Newtons.
virtual float32 GetReactionTorque (float32 inv_dt) const =0
 Get the reaction torque on body2 in N*m.
b2JointGetNext ()
 Get the next joint the world joint list.
void * GetUserData () const
 Get the user data pointer.
void SetUserData (void *data)
 Set the user data pointer.
bool IsActive () const
 Short-cut function to determine if either body is inactive.

Protected Member Functions

 b2Joint (const b2JointDef *def)
virtual ~b2Joint ()
virtual void InitVelocityConstraints (const b2TimeStep &step)=0
virtual void SolveVelocityConstraints (const b2TimeStep &step)=0
virtual bool SolvePositionConstraints (float32 baumgarte)=0

Static Protected Member Functions

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

Protected Attributes

b2JointType m_type
b2Jointm_prev
b2Jointm_next
b2JointEdge m_edgeA
b2JointEdge m_edgeB
b2Bodym_bodyA
b2Bodym_bodyB
bool m_islandFlag
bool m_collideConnected
void * m_userData
b2Vec2 m_localCenterA
b2Vec2 m_localCenterB
float32 m_invMassA
float32 m_invIA
float32 m_invMassB
float32 m_invIB

Friends

class b2World
class b2Body
class b2Island

Detailed Description

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


Constructor & Destructor Documentation

b2Joint::b2Joint ( const b2JointDef def  )  [protected]
virtual b2Joint::~b2Joint (  )  [inline, protected, virtual]

Member Function Documentation

b2Joint * b2Joint::Create ( const b2JointDef def,
b2BlockAllocator allocator 
) [static, protected]
void b2Joint::Destroy ( b2Joint joint,
b2BlockAllocator allocator 
) [static, protected]
virtual b2Vec2 b2Joint::GetAnchorA (  )  const [pure virtual]

Get the anchor point on bodyA in world coordinates.

Implemented in b2DistanceJoint, b2FrictionJoint, b2GearJoint, b2LineJoint, b2MouseJoint, b2PrismaticJoint, b2PulleyJoint, b2RevoluteJoint, and b2WeldJoint.

virtual b2Vec2 b2Joint::GetAnchorB (  )  const [pure virtual]

Get the anchor point on bodyB in world coordinates.

Implemented in b2DistanceJoint, b2FrictionJoint, b2GearJoint, b2LineJoint, b2MouseJoint, b2PrismaticJoint, b2PulleyJoint, b2RevoluteJoint, and b2WeldJoint.

b2Body * b2Joint::GetBodyA (  )  [inline]

Get the first body attached to this joint.

b2Body * b2Joint::GetBodyB (  )  [inline]

Get the second body attached to this joint.

b2Joint * b2Joint::GetNext (  )  [inline]

Get the next joint the world joint list.

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

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

Implemented in b2DistanceJoint, b2FrictionJoint, b2GearJoint, b2LineJoint, b2MouseJoint, b2PrismaticJoint, b2PulleyJoint, b2RevoluteJoint, and b2WeldJoint.

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

Get the type of the concrete joint.

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

Get the user data pointer.

virtual void b2Joint::InitVelocityConstraints ( const b2TimeStep step  )  [protected, pure virtual]
bool b2Joint::IsActive (  )  const

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

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

Set the user data pointer.

virtual bool b2Joint::SolvePositionConstraints ( float32  baumgarte  )  [protected, pure virtual]
virtual void b2Joint::SolveVelocityConstraints ( const b2TimeStep step  )  [protected, pure virtual]

Friends And Related Function Documentation

friend class b2Body [friend]
friend class b2Island [friend]
friend class b2World [friend]

Member Data Documentation

b2Body* b2Joint::m_bodyA [protected]
b2Body* b2Joint::m_bodyB [protected]
bool b2Joint::m_collideConnected [protected]
bool b2Joint::m_islandFlag [protected]
b2Joint* b2Joint::m_next [protected]
b2Joint* b2Joint::m_prev [protected]
void* b2Joint::m_userData [protected]

The documentation for this class was generated from the following files:
Generated on Sat Apr 3 18:18:09 2010 for Box2D by  doxygen 1.6.3