|
Box2D
2.4.1
A 2D physics engine for games
|
76 type = e_unknownJoint;
79 collideConnected =
false;
99 B2_API
void b2LinearStiffness(
float& stiffness,
float& damping,
100 float frequencyHertz,
float dampingRatio,
104 B2_API
void b2AngularStiffness(
float& stiffness,
float& damping,
105 float frequencyHertz,
float dampingRatio,
115 b2JointType GetType()
const;
124 virtual b2Vec2 GetAnchorA()
const = 0;
127 virtual b2Vec2 GetAnchorB()
const = 0;
130 virtual b2Vec2 GetReactionForce(
float inv_dt)
const = 0;
133 virtual float GetReactionTorque(
float inv_dt)
const = 0;
137 const b2Joint* GetNext()
const;
143 bool IsEnabled()
const;
148 bool GetCollideConnected()
const;
151 virtual void Dump() { b2Dump(
"// Dump is not supported for this joint type.\n"); }
157 virtual void Draw(
b2Draw* draw)
const;
162 friend class b2Island;
171 virtual void InitVelocityConstraints(
const b2SolverData& data) = 0;
172 virtual void SolveVelocityConstraints(
const b2SolverData& data) = 0;
175 virtual bool SolvePositionConstraints(
const b2SolverData& data) = 0;
188 bool m_collideConnected;
225 return m_collideConnected;
A 2D column vector.
Definition: b2_math.h:41
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:128
b2Body * GetBodyA()
Get the first body attached to this joint.
Definition: b2_joint.h:198
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition: b2_joint.h:95
b2Body * GetBodyB()
Get the second body attached to this joint.
Definition: b2_joint.h:203
b2Joint * joint
the joint
Definition: b2_joint.h:66
Joint definitions are used to construct joints.
Definition: b2_joint.h:72
b2JointType type
The joint type is set automatically for concrete joint types.
Definition: b2_joint.h:83
b2JointType GetType() const
Get the type of the concrete joint.
Definition: b2_joint.h:193
bool GetCollideConnected() const
Definition: b2_joint.h:223
b2Body * bodyB
The second attached body.
Definition: b2_joint.h:92
virtual void Dump()
Dump this joint to the log file.
Definition: b2_joint.h:151
Definition: b2_block_allocator.h:37
Definition: b2_joint.h:51
b2Joint * GetNext()
Get the next joint the world joint list.
Definition: b2_joint.h:208
virtual void ShiftOrigin(const b2Vec2 &newOrigin)
Shift the origin for any points stored in world coordinates.
Definition: b2_joint.h:154
Definition: b2_joint.h:63
b2JointEdge * prev
the previous joint edge in the body's joint list
Definition: b2_joint.h:67
Definition: b2_world.h:46
Definition: b2_gear_joint.h:61
Solver Data.
Definition: b2_time_step.h:67
b2JointEdge * next
the next joint edge in the body's joint list
Definition: b2_joint.h:68
b2JointUserData & GetUserData()
Get the user data pointer.
Definition: b2_joint.h:218
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:89
Definition: b2_joint.h:110
b2JointUserData userData
Use this to attach application specific data to your joints.
Definition: b2_joint.h:86
You can define this to inject whatever data you want in b2Joint.
Definition: b2_settings.h:82