 |
Box2D
2.4.0
A 2D physics engine for games
|
76 type = e_unknownJoint;
80 collideConnected =
false;
100 B2_API
void b2LinearStiffness(
float& stiffness,
float& damping,
101 float frequencyHertz,
float dampingRatio,
105 B2_API
void b2AngularStiffness(
float& stiffness,
float& damping,
106 float frequencyHertz,
float dampingRatio,
116 b2JointType GetType()
const;
138 const b2Joint* GetNext()
const;
141 void* GetUserData()
const;
144 void SetUserData(
void* data);
152 bool GetCollideConnected()
const;
155 virtual void Dump() { b2Dump(
"// Dump is not supported for this joint type.\n"); }
166 friend class b2Island;
175 virtual void InitVelocityConstraints(
const b2SolverData& data) = 0;
176 virtual void SolveVelocityConstraints(
const b2SolverData& data) = 0;
179 virtual bool SolvePositionConstraints(
const b2SolverData& data) = 0;
192 bool m_collideConnected;
234 return m_collideConnected;
A 2D column vector.
Definition: b2_math.h:42
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:133
void * GetUserData() const
Get the user data pointer.
Definition: b2_joint.h:222
b2Body * GetBodyA()
Get the first body attached to this joint.
Definition: b2_joint.h:202
virtual b2Vec2 GetReactionForce(float inv_dt) const =0
Get the reaction force on bodyB at the joint anchor in Newtons.
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition: b2_joint.h:96
virtual b2Vec2 GetAnchorA() const =0
Get the anchor point on bodyA in world coordinates.
b2Body * GetBodyB()
Get the second body attached to this joint.
Definition: b2_joint.h:207
b2Joint * joint
the joint
Definition: b2_joint.h:66
Joint definitions are used to construct joints.
Definition: b2_joint.h:73
b2JointType type
The joint type is set automatically for concrete joint types.
Definition: b2_joint.h:84
void SetUserData(void *data)
Set the user data pointer.
Definition: b2_joint.h:227
virtual void Draw(b2Draw *draw) const
Debug draw this joint.
b2JointType GetType() const
Get the type of the concrete joint.
Definition: b2_joint.h:197
bool IsEnabled() const
Short-cut function to determine if either body is enabled.
bool GetCollideConnected() const
Definition: b2_joint.h:232
b2Body * bodyB
The second attached body.
Definition: b2_joint.h:93
virtual void Dump()
Dump this joint to the log file.
Definition: b2_joint.h:155
Definition: b2_block_allocator.h:38
Definition: b2_joint.h:52
virtual void ShiftOrigin(const b2Vec2 &newOrigin)
Shift the origin for any points stored in world coordinates.
Definition: b2_joint.h:158
Definition: b2_joint.h:64
b2JointEdge * prev
the previous joint edge in the body's joint list
Definition: b2_joint.h:67
Definition: b2_world.h:47
Definition: b2_gear_joint.h:61
Solver Data.
Definition: b2_time_step.h:68
b2JointEdge * next
the next joint edge in the body's joint list
Definition: b2_joint.h:68
virtual b2Vec2 GetAnchorB() const =0
Get the anchor point on bodyB in world coordinates.
b2Body * other
provides quick access to the other body attached.
Definition: b2_joint.h:65
b2Body * bodyA
The first attached body.
Definition: b2_joint.h:90
Definition: b2_joint.h:112
virtual float GetReactionTorque(float 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: b2_joint.h:87
b2Joint * GetNext()
Get the next joint the world joint list.
Definition: b2_joint.h:212