22 #include <Box2D/Common/b2Math.h>
78 type = e_unknownJoint;
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
virtual b2Vec2 GetReactionForce(float32 inv_dt) const =0
Get the reaction force on bodyB at the joint anchor in Newtons.
b2Body * GetBodyA()
Get the first body attached to this joint.
Definition: b2Joint.h:191
b2Body * bodyB
The second attached body.
Definition: b2Joint.h:95
virtual float32 GetReactionTorque(float32 inv_dt) const =0
Get the reaction torque on bodyB in N*m.
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
void * GetUserData() const
Get the user data pointer.
Definition: b2Joint.h:211
Definition: b2BlockAllocator.h:35
Definition: b2Joint.h:103
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.
bool IsActive() const
Short-cut function to determine if either body is inactive.
Definition: b2Joint.cpp:208
bool GetCollideConnected() const
Definition: b2Joint.h:221
Definition: b2GearJoint.h:56
b2JointType GetType() const
Get the type of the concrete joint.
Definition: b2Joint.h:186
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
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