75 type = e_unknownJoint;
78 collideConnected =
false;
98B2_API
void b2LinearStiffness(
float& stiffness,
float& damping,
99 float frequencyHertz,
float dampingRatio,
103B2_API
void b2AngularStiffness(
float& stiffness,
float& damping,
104 float frequencyHertz,
float dampingRatio,
114 b2JointType GetType()
const;
136 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;
230 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:110
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:228
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.
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:82
b2JointUserData userData
Use this to attach application specific data to your joints.
Definition b2_joint.h:85
b2Body * bodyA
The first attached body.
Definition b2_joint.h:88
b2Body * bodyB
The second attached body.
Definition b2_joint.h:91
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition b2_joint.h:94
b2JointEdge * next
the next joint edge in the body's joint list
Definition b2_joint.h:67
b2Body * other
provides quick access to the other body attached.
Definition b2_joint.h:64
b2Joint * joint
the joint
Definition b2_joint.h:65
b2JointEdge * prev
the previous joint edge in the body's joint list
Definition b2_joint.h:66
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