102 m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;
169 b2Rot qA(aA), qB(aB);
173 b2Vec2 u = cB + rB - cA - rA;
233 b2Log(
" b2RopeJointDef jd;\n");
234 b2Log(
" jd.bodyA = bodies[%d];\n", indexA);
235 b2Log(
" jd.bodyB = bodies[%d];\n", indexB);
240 b2Log(
" joints[%d] = m_world->CreateJoint(&jd);\n",
m_index);
GLuint GLsizei GLsizei * length
float32 b2Dot(const b2Vec2 &a, const b2Vec2 &b)
Perform the dot product on two vectors.
b2Vec2 b2Mul(const b2Mat22 &A, const b2Vec2 &v)
void b2Log(const char *string,...)
Logging function.
void Dump()
Dump joint to dmLog.
bool SolvePositionConstraints(const b2SolverData &data)
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
b2Vec2 GetWorldPoint(const b2Vec2 &localPoint) const
void InitVelocityConstraints(const b2SolverData &data)
void SetZero()
Set this vector to all zeros.
b2Vec2 GetAnchorB() const
Get the anchor point on bodyB in world coordinates.
#define b2_maxLinearCorrection
b2Vec2 localCenter
local center of mass position
float32 b2Cross(const b2Vec2 &a, const b2Vec2 &b)
Perform the cross product on two vectors. In 2D this produces a scalar.
b2LimitState GetLimitState() const
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
void SolveVelocityConstraints(const b2SolverData &data)
b2RopeJoint(const b2RopeJointDef *data)
T b2Clamp(T a, T low, T high)
b2Vec2 GetReactionForce(float32 inv_dt) const
Get the reaction force on bodyB at the joint anchor in Newtons.
float32 GetReactionTorque(float32 inv_dt) const
Get the reaction torque on bodyB in N*m.
float32 Normalize()
Convert this vector into a unit vector. Returns the length.
float32 Length() const
Get the length of this vector (the norm).
b2Vec2 GetAnchorA() const
Get the anchor point on bodyA in world coordinates.
float32 GetMaxLength() const
GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble f