22 #include <Box2D/Common/b2Math.h> 78 type = e_unknownJoint;
82 collideConnected =
false;
108 b2JointType GetType()
const;
117 virtual b2Vec2 GetAnchorA()
const = 0;
120 virtual b2Vec2 GetAnchorB()
const = 0;
123 virtual b2Vec2 GetReactionForce(float32 inv_dt)
const = 0;
126 virtual float32 GetReactionTorque(float32 inv_dt)
const = 0;
130 const b2Joint* GetNext()
const;
133 void* GetUserData()
const;
136 void SetUserData(
void* data);
139 bool IsActive()
const;
144 bool GetCollideConnected()
const;
147 virtual void Dump() {
b2Log(
"// Dump is not supported for this joint type.\n"); }
164 virtual void InitVelocityConstraints(
const b2SolverData& data) = 0;
165 virtual void SolveVelocityConstraints(
const b2SolverData& data) = 0;
168 virtual bool SolvePositionConstraints(
const b2SolverData& data) = 0;
181 bool m_collideConnected;
223 return m_collideConnected;
b2Joint * joint
the joint
Definition: b2Joint.h:68
b2Body * bodyA
The first attached body.
Definition: b2Joint.h:92
void SetUserData(void *data)
Set the user data pointer.
Definition: b2Joint.h:216
void b2Log(const char *string,...)
Logging function.
Definition: b2Settings.cpp:38
b2Body * other
provides quick access to the other body attached.
Definition: b2Joint.h:67
b2Body * GetBodyA()
Get the first body attached to this joint.
Definition: b2Joint.h:191
b2Body * bodyB
The second attached body.
Definition: b2Joint.h:95
void * userData
Use this to attach application specific data to your joints.
Definition: b2Joint.h:89
virtual void ShiftOrigin(const b2Vec2 &newOrigin)
Shift the origin for any points stored in world coordinates.
Definition: b2Joint.h:150
Definition: b2BlockAllocator.h:35
Definition: b2Joint.h:103
b2JointType GetType() const
Get the type of the concrete joint.
Definition: b2Joint.h:186
Definition: b2GearJoint.h:56
b2JointType type
The joint type is set automatically for concrete joint types.
Definition: b2Joint.h:86
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition: b2Joint.h:98
Solver Data.
Definition: b2TimeStep.h:63
bool GetCollideConnected() const
Definition: b2Joint.h:221
void * GetUserData() const
Get the user data pointer.
Definition: b2Joint.h:211
Joint definitions are used to construct joints.
Definition: b2Joint.h:74
A rigid body. These are created via b2World::CreateBody.
Definition: b2Body.h:126
This is an internal class.
Definition: b2Island.h:34
b2Body * GetBodyB()
Get the second body attached to this joint.
Definition: b2Joint.h:196
virtual void Dump()
Dump this joint to the log file.
Definition: b2Joint.h:147
b2JointEdge * prev
the previous joint edge in the body's joint list
Definition: b2Joint.h:69
A 2D column vector.
Definition: b2Math.h:53
b2JointEdge * next
the next joint edge in the body's joint list
Definition: b2Joint.h:70
b2Joint * GetNext()
Get the next joint the world joint list.
Definition: b2Joint.h:201