b2Joint * joint2
The second revolute/prismatic joint attached to the gear joint.
b2Fixture * CreateFixture(const b2FixtureDef *def)
void Step(Settings &settings) override
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor)
b2PrismaticJoint * m_joint3
float lowerTranslation
The lower translation limit, usually in meters.
void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
void SetAsBox(float hx, float hy)
A rigid body. These are created via b2World::CreateBody.
b2RevoluteJoint * m_joint1
b2Joint * CreateJoint(const b2JointDef *def)
float GetJointAngle() const
Get the current joint angle in radians.
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
void Set(float x_, float y_)
Set this vector to some specified coordinates.
bool enableLimit
Enable/disable the joint limit.
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis)
float referenceAngle
The bodyB angle minus bodyA angle in the reference state (radians).
b2Joint * joint1
The first revolute/prismatic joint attached to the gear joint.
float upperTranslation
The upper translation limit, usually in meters.
b2Vec2 GetLocalPoint(const b2Vec2 &worldPoint) const
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
void DrawString(int x, int y, const char *string,...)
virtual void Step(Settings &settings)
b2Body * bodyA
The first attached body.
b2RevoluteJoint * m_joint2
b2Body * CreateBody(const b2BodyDef *def)
float GetJointTranslation() const
Get the current joint translation, usually in meters.
b2Body * bodyB
The second attached body.