Go to the documentation of this file.
149 float Cdot = wB - wA;
246 b2Dump(
" b2FrictionJointDef jd;\n");
247 b2Dump(
" jd.bodyA = bodies[%d];\n", indexA);
248 b2Dump(
" jd.bodyB = bodies[%d];\n", indexB);
254 b2Dump(
" joints[%d] = m_world->CreateJoint(&jd);\n",
m_index);
float b2Cross(const b2Vec2 &a, const b2Vec2 &b)
Perform the cross product on two vectors. In 2D this produces a scalar.
b2Vec2 GetReactionForce(float inv_dt) const override
Get the reaction force on bodyB at the joint anchor in Newtons.
Friction joint definition.
float maxForce
The maximum friction force in N.
b2Vec2 localCenter
local center of mass position
float Normalize()
Convert this vector into a unit vector. Returns the length.
A 2-by-2 matrix. Stored in column-major order.
A rigid body. These are created via b2World::CreateBody.
void SetZero()
Set this vector to all zeros.
b2Vec2 b2Mul(const b2Mat22 &A, const b2Vec2 &v)
void b2Dump(const char *string,...)
void Dump() override
Dump joint to dmLog.
b2Mat22 GetInverse() const
T b2Clamp(T a, T low, T high)
void SolveVelocityConstraints(const b2SolverData &data) override
bool b2IsValid(float x)
This function is used to ensure that a floating point number is not a NaN or infinity.
b2Vec2 GetAnchorB() const override
Get the anchor point on bodyB in world coordinates.
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
b2Vec2 GetLocalPoint(const b2Vec2 &worldPoint) const
float LengthSquared() const
float GetReactionTorque(float inv_dt) const override
Get the reaction torque on bodyB in N*m.
float GetMaxForce() const
Get the maximum friction force in N.
b2FrictionJoint(const b2FrictionJointDef *def)
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor)
bool SolvePositionConstraints(const b2SolverData &data) override
void InitVelocityConstraints(const b2SolverData &data) override
b2Vec2 GetAnchorA() const override
Get the anchor point on bodyA in world coordinates.
void SetMaxTorque(float torque)
Set the maximum friction torque in N*m.
float maxTorque
The maximum friction torque in N-m.
void SetMaxForce(float force)
Set the maximum friction force in N.
b2Vec2 GetWorldPoint(const b2Vec2 &localPoint) const
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
b2Body * bodyA
The first attached body.
float GetMaxTorque() const
Get the maximum friction torque in N*m.
b2Body * bodyB
The second attached body.
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:07