76 type = e_unknownJoint;
79 collideConnected =
false;
99B2_API
void b2LinearStiffness(
float& stiffness,
float& damping,
100 float frequencyHertz,
float dampingRatio,
104B2_API
void b2AngularStiffness(
float& stiffness,
float& damping,
105 float frequencyHertz,
float dampingRatio,
115 b2JointType GetType()
const;
137 const b2Joint* GetNext()
const;
148 bool GetCollideConnected()
const;
151 virtual void Dump() { b2Dump(
"// Dump is not supported for this joint type.\n"); }
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;
Definition: b2_block_allocator.h:38
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:129
Definition: b2_gear_joint.h:62
Definition: b2_joint.h:111
b2Joint * GetNext()
Get the next joint the world joint list.
Definition: b2_joint.h:208
b2Body * GetBodyA()
Get the first body attached to this joint.
Definition: b2_joint.h:198
bool GetCollideConnected() const
Definition: b2_joint.h:223
b2Body * GetBodyB()
Get the second body attached to this joint.
Definition: b2_joint.h:203
virtual void ShiftOrigin(const b2Vec2 &newOrigin)
Shift the origin for any points stored in world coordinates.
Definition: b2_joint.h:154
virtual b2Vec2 GetAnchorB() const =0
Get the anchor point on bodyB in world coordinates.
b2JointUserData & GetUserData()
Get the user data pointer.
Definition: b2_joint.h:218
virtual void Dump()
Dump this joint to the log file.
Definition: b2_joint.h:151
virtual b2Vec2 GetAnchorA() const =0
Get the anchor point on bodyA in world coordinates.
b2JointType GetType() const
Get the type of the concrete joint.
Definition: b2_joint.h:193
bool IsEnabled() const
Short-cut function to determine if either body is enabled.
virtual b2Vec2 GetReactionForce(float inv_dt) const =0
Get the reaction force on bodyB at the joint anchor in Newtons.
virtual void Draw(b2Draw *draw) const
Debug draw this joint.
virtual float GetReactionTorque(float inv_dt) const =0
Get the reaction torque on bodyB in N*m.
Definition: b2_world.h:47
Definition: b2_joint.h:52
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:83
b2JointUserData userData
Use this to attach application specific data to your joints.
Definition: b2_joint.h:86
b2Body * bodyA
The first attached body.
Definition: b2_joint.h:89
b2Body * bodyB
The second attached body.
Definition: b2_joint.h:92
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition: b2_joint.h:95
Definition: b2_joint.h:64
b2JointEdge * next
the next joint edge in the body's joint list
Definition: b2_joint.h:68
b2Body * other
provides quick access to the other body attached.
Definition: b2_joint.h:65
b2Joint * joint
the joint
Definition: b2_joint.h:66
b2JointEdge * prev
the previous joint edge in the body's joint list
Definition: b2_joint.h:67
You can define this to inject whatever data you want in b2Joint.
Definition: b2_settings.h:83
Solver Data.
Definition: b2_time_step.h:68
A 2D column vector.
Definition: b2_math.h:42