 |
Box2D
2.4.1
A 2D physics engine for games
|
23 #ifndef B2_FRICTION_JOINT_H
24 #define B2_FRICTION_JOINT_H
34 type = e_frictionJoint;
35 localAnchorA.SetZero();
36 localAnchorB.SetZero();
96 void InitVelocityConstraints(
const b2SolverData& data)
override;
97 void SolveVelocityConstraints(
const b2SolverData& data)
override;
98 bool SolvePositionConstraints(
const b2SolverData& data)
override;
105 float m_angularImpulse;
A 2D column vector.
Definition: b2_math.h:42
Definition: b2_friction_joint.h:61
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:129
float maxTorque
The maximum friction torque in N-m.
Definition: b2_friction_joint.h:55
float GetReactionTorque(float inv_dt) const override
Get the reaction torque on bodyB in N*m.
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition: b2_friction_joint.h:46
Joint definitions are used to construct joints.
Definition: b2_joint.h:73
void Dump() override
Dump joint to dmLog.
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor)
void SetMaxTorque(float torque)
Set the maximum friction torque in N*m.
float maxForce
The maximum friction force in N.
Definition: b2_friction_joint.h:52
float GetMaxForce() const
Get the maximum friction force in N.
const b2Vec2 & GetLocalAnchorA() const
The local anchor point relative to bodyA's origin.
Definition: b2_friction_joint.h:70
b2Vec2 GetAnchorA() const override
Get the anchor point on bodyA in world coordinates.
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition: b2_friction_joint.h:49
A 2-by-2 matrix. Stored in column-major order.
Definition: b2_math.h:172
Solver Data.
Definition: b2_time_step.h:68
b2Vec2 GetReactionForce(float inv_dt) const override
Get the reaction force on bodyB at the joint anchor in Newtons.
void SetMaxForce(float force)
Set the maximum friction force in N.
Definition: b2_joint.h:111
b2Vec2 GetAnchorB() const override
Get the anchor point on bodyB in world coordinates.
Friction joint definition.
Definition: b2_friction_joint.h:31
float GetMaxTorque() const
Get the maximum friction torque in N*m.
const b2Vec2 & GetLocalAnchorB() const
The local anchor point relative to bodyB's origin.
Definition: b2_friction_joint.h:73