23#ifndef B2_GEAR_JOINT_H 
   24#define B2_GEAR_JOINT_H 
   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;
 
A rigid body. These are created via b2World::CreateBody.
Definition: b2_body.h:129
 
Definition: b2_gear_joint.h:62
 
b2Vec2 GetAnchorA() const override
Get the anchor point on bodyA in world coordinates.
 
b2Vec2 GetReactionForce(float inv_dt) const override
Get the reaction force on bodyB at the joint anchor in Newtons.
 
b2Vec2 GetAnchorB() const override
Get the anchor point on bodyB in world coordinates.
 
void Dump() override
Dump joint to dmLog.
 
float GetReactionTorque(float inv_dt) const override
Get the reaction torque on bodyB in N*m.
 
b2Joint * GetJoint1()
Get the first joint.
Definition: b2_gear_joint.h:71
 
b2Joint * GetJoint2()
Get the second joint.
Definition: b2_gear_joint.h:74
 
void SetRatio(float ratio)
Set/Get the gear ratio.
 
Definition: b2_joint.h:111
 
Definition: b2_gear_joint.h:32
 
b2Joint * joint2
The second revolute/prismatic joint attached to the gear joint.
Definition: b2_gear_joint.h:45
 
float ratio
Definition: b2_gear_joint.h:49
 
b2Joint * joint1
The first revolute/prismatic joint attached to the gear joint.
Definition: b2_gear_joint.h:42
 
Joint definitions are used to construct joints.
Definition: b2_joint.h:73
 
Solver Data.
Definition: b2_time_step.h:68
 
A 2D column vector.
Definition: b2_math.h:42