#include <b2_joint.h>
Public Member Functions | |
virtual void | Draw (b2Draw *draw) const |
Debug draw this joint. More... | |
virtual void | Dump () |
Dump this joint to the log file. More... | |
virtual b2Vec2 | GetAnchorA () const =0 |
Get the anchor point on bodyA in world coordinates. More... | |
virtual b2Vec2 | GetAnchorB () const =0 |
Get the anchor point on bodyB in world coordinates. More... | |
b2Body * | GetBodyA () |
Get the first body attached to this joint. More... | |
b2Body * | GetBodyB () |
Get the second body attached to this joint. More... | |
bool | GetCollideConnected () const |
b2Joint * | GetNext () |
Get the next joint the world joint list. More... | |
const b2Joint * | GetNext () const |
virtual b2Vec2 | GetReactionForce (float inv_dt) const =0 |
Get the reaction force on bodyB at the joint anchor in Newtons. More... | |
virtual float | GetReactionTorque (float inv_dt) const =0 |
Get the reaction torque on bodyB in N*m. More... | |
b2JointType | GetType () const |
Get the type of the concrete joint. More... | |
b2JointUserData & | GetUserData () |
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 | |
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 |
b2JointUserData | 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.
Definition at line 110 of file b2_joint.h.
|
protected |
Definition at line 225 of file b2_joint.cpp.
|
inlineprotectedvirtual |
Definition at line 169 of file b2_joint.h.
|
staticprotected |
Definition at line 90 of file b2_joint.cpp.
|
staticprotected |
Definition at line 174 of file b2_joint.cpp.
Debug draw this joint.
Reimplemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, and b2DistanceJoint.
Definition at line 255 of file b2_joint.cpp.
|
inlinevirtual |
Dump this joint to the log file.
Reimplemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, b2DistanceJoint, b2PulleyJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, and b2GearJoint.
Definition at line 151 of file b2_joint.h.
|
pure virtual |
Get the anchor point on bodyA in world coordinates.
Implemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, b2PulleyJoint, b2DistanceJoint, b2WeldJoint, b2MouseJoint, b2MotorJoint, b2GearJoint, and b2FrictionJoint.
|
pure virtual |
Get the anchor point on bodyB in world coordinates.
Implemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, b2PulleyJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2GearJoint, and b2FrictionJoint.
|
inline |
Get the first body attached to this joint.
Definition at line 198 of file b2_joint.h.
|
inline |
Get the second body attached to this joint.
Definition at line 203 of file b2_joint.h.
|
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 223 of file b2_joint.h.
|
inline |
Get the next joint the world joint list.
Definition at line 208 of file b2_joint.h.
|
inline |
Definition at line 213 of file b2_joint.h.
|
pure virtual |
Get the reaction force on bodyB at the joint anchor in Newtons.
Implemented in b2RevoluteJoint, b2WheelJoint, b2PrismaticJoint, b2PulleyJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2GearJoint, and b2FrictionJoint.
|
pure virtual |
Get the reaction torque on bodyB in N*m.
Implemented in b2RevoluteJoint, b2WheelJoint, b2PrismaticJoint, b2PulleyJoint, b2DistanceJoint, b2MouseJoint, b2WeldJoint, b2MotorJoint, b2GearJoint, and b2FrictionJoint.
|
inline |
Get the type of the concrete joint.
Definition at line 193 of file b2_joint.h.
|
inline |
Get the user data pointer.
Definition at line 218 of file b2_joint.h.
|
protectedpure virtual |
Implemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, b2DistanceJoint, b2PulleyJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, and b2GearJoint.
bool b2Joint::IsEnabled | ( | ) | const |
Short-cut function to determine if either body is enabled.
Definition at line 250 of file b2_joint.cpp.
Shift the origin for any points stored in world coordinates.
Reimplemented in b2PulleyJoint, and b2MouseJoint.
Definition at line 154 of file b2_joint.h.
|
protectedpure virtual |
Implemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, b2DistanceJoint, b2PulleyJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, and b2GearJoint.
|
protectedpure virtual |
Implemented in b2WheelJoint, b2RevoluteJoint, b2PrismaticJoint, b2DistanceJoint, b2PulleyJoint, b2MotorJoint, b2MouseJoint, b2WeldJoint, b2FrictionJoint, and b2GearJoint.
|
friend |
Definition at line 161 of file b2_joint.h.
|
friend |
Definition at line 163 of file b2_joint.h.
|
friend |
Definition at line 162 of file b2_joint.h.
|
friend |
Definition at line 160 of file b2_joint.h.
|
protected |
Definition at line 182 of file b2_joint.h.
|
protected |
Definition at line 183 of file b2_joint.h.
|
protected |
Definition at line 188 of file b2_joint.h.
|
protected |
Definition at line 180 of file b2_joint.h.
|
protected |
Definition at line 181 of file b2_joint.h.
|
protected |
Definition at line 185 of file b2_joint.h.
|
protected |
Definition at line 187 of file b2_joint.h.
|
protected |
Definition at line 179 of file b2_joint.h.
|
protected |
Definition at line 178 of file b2_joint.h.
|
protected |
Definition at line 177 of file b2_joint.h.
|
protected |
Definition at line 190 of file b2_joint.h.