#include <b2Joint.h>
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. | |
b2Body * | GetBodyA () |
Get the first body attached to this joint. | |
b2Body * | GetBodyB () |
Get the second body attached to this joint. | |
bool | GetCollideConnected () const |
b2Joint * | GetNext () |
Get the next joint the world joint list. | |
const b2Joint * | GetNext () 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 b2Joint * | Create (const b2JointDef *def, b2BlockAllocator *allocator) |
static void | Destroy (b2Joint *joint, b2BlockAllocator *allocator) |
Protected Attributes | |
b2Body * | m_bodyA |
b2Body * | m_bodyB |
bool | m_collideConnected |
b2JointEdge | m_edgeA |
b2JointEdge | m_edgeB |
int32 | m_index |
bool | m_islandFlag |
b2Joint * | m_next |
b2Joint * | m_prev |
b2JointType | m_type |
void * | m_userData |
Friends | |
class | b2Body |
class | b2GearJoint |
class | b2Island |
class | b2World |
The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.
b2Joint::b2Joint | ( | const b2JointDef * | def | ) | [protected] |
Definition at line 183 of file b2Joint.cpp.
virtual b2Joint::~b2Joint | ( | ) | [inline, protected, virtual] |
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.
virtual b2Vec2 b2Joint::GetAnchorA | ( | ) | const [pure virtual] |
Get the anchor point on bodyA in world coordinates.
Implemented in b2RevoluteJoint, b2PrismaticJoint, b2PulleyJoint, b2WheelJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2RopeJoint, b2GearJoint, and b2FrictionJoint.
virtual b2Vec2 b2Joint::GetAnchorB | ( | ) | const [pure virtual] |
Get the anchor point on bodyB in world coordinates.
Implemented in b2RevoluteJoint, b2PrismaticJoint, b2PulleyJoint, b2WheelJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2RopeJoint, b2GearJoint, and b2FrictionJoint.
b2Body * b2Joint::GetBodyA | ( | ) | [inline] |
b2Body * b2Joint::GetBodyB | ( | ) | [inline] |
bool b2Joint::GetCollideConnected | ( | ) | const [inline] |
b2Joint * b2Joint::GetNext | ( | ) | [inline] |
const b2Joint * b2Joint::GetNext | ( | ) | const [inline] |
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] |
Get the reaction torque on bodyB in N*m.
Implemented in b2RevoluteJoint, b2PrismaticJoint, b2PulleyJoint, b2WheelJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2RopeJoint, b2GearJoint, and b2FrictionJoint.
b2JointType b2Joint::GetType | ( | ) | const [inline] |
void * b2Joint::GetUserData | ( | ) | const [inline] |
virtual void b2Joint::InitVelocityConstraints | ( | const b2SolverData & | data | ) | [protected, pure virtual] |
Implemented in b2RevoluteJoint, b2PrismaticJoint, b2WheelJoint, b2PulleyJoint, b2DistanceJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, b2RopeJoint, and b2GearJoint.
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] |
virtual void b2Joint::ShiftOrigin | ( | const b2Vec2 & | newOrigin | ) | [inline, virtual] |
Shift the origin for any points stored in world coordinates.
Reimplemented in b2PulleyJoint, and b2MouseJoint.
virtual bool b2Joint::SolvePositionConstraints | ( | const b2SolverData & | data | ) | [protected, pure virtual] |
Implemented in b2RevoluteJoint, b2PrismaticJoint, b2WheelJoint, b2PulleyJoint, b2DistanceJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, b2RopeJoint, and b2GearJoint.
virtual void b2Joint::SolveVelocityConstraints | ( | const b2SolverData & | data | ) | [protected, pure virtual] |
Implemented in b2RevoluteJoint, b2PrismaticJoint, b2WheelJoint, b2PulleyJoint, b2DistanceJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, b2RopeJoint, and b2GearJoint.
friend class b2GearJoint [friend] |
Reimplemented in b2RevoluteJoint, and b2PrismaticJoint.
b2Body* b2Joint::m_bodyA [protected] |
b2Body* b2Joint::m_bodyB [protected] |
bool b2Joint::m_collideConnected [protected] |
b2JointEdge b2Joint::m_edgeA [protected] |
b2JointEdge b2Joint::m_edgeB [protected] |
int32 b2Joint::m_index [protected] |
bool b2Joint::m_islandFlag [protected] |
b2Joint* b2Joint::m_next [protected] |
b2Joint* b2Joint::m_prev [protected] |
b2JointType b2Joint::m_type [protected] |
void* b2Joint::m_userData [protected] |