23 #ifndef B2_GEAR_JOINT_H 24 #define B2_GEAR_JOINT_H 77 void SetRatio(
float ratio);
78 float GetRatio()
const;
88 void InitVelocityConstraints(
const b2SolverData& data)
override;
89 void SolveVelocityConstraints(
const b2SolverData& data)
override;
90 bool SolvePositionConstraints(
const b2SolverData& data)
override;
112 float m_referenceAngleA;
113 float m_referenceAngleB;
121 int32 m_indexA, m_indexB, m_indexC, m_indexD;
122 b2Vec2 m_lcA, m_lcB, m_lcC, m_lcD;
123 float m_mA, m_mB, m_mC, m_mD;
124 float m_iA, m_iB, m_iC, m_iD;
126 float m_JwA, m_JwB, m_JwC, m_JwD;
b2Joint * joint1
The first revolute/prismatic joint attached to the gear joint.
Definition: b2_gear_joint.h:42
Definition: b2_joint.h:110
virtual b2Vec2 GetAnchorA() const =0
Get the anchor point on bodyA in world coordinates.
virtual b2Vec2 GetAnchorB() const =0
Get the anchor point on bodyB in world coordinates.
virtual float GetReactionTorque(float inv_dt) const =0
Get the reaction torque on bodyB in N*m.
float ratio
Definition: b2_gear_joint.h:49
Definition: b2_gear_joint.h:61
b2Joint * joint2
The second revolute/prismatic joint attached to the gear joint.
Definition: b2_gear_joint.h:45
b2Joint * GetJoint1()
Get the first joint.
Definition: b2_gear_joint.h:71
Solver Data.
Definition: b2_time_step.h:67
Joint definitions are used to construct joints.
Definition: b2_joint.h:72
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:128
virtual void Dump()
Dump this joint to the log file.
Definition: b2_joint.h:151
virtual b2Vec2 GetReactionForce(float inv_dt) const =0
Get the reaction force on bodyB at the joint anchor in Newtons.
A 2D column vector.
Definition: b2_math.h:41
Definition: b2_gear_joint.h:31
b2Joint * GetJoint2()
Get the second joint.
Definition: b2_gear_joint.h:74