19 #ifndef B2_MOTOR_JOINT_H 
   20 #define B2_MOTOR_JOINT_H 
   22 #include <Box2D/Dynamics/Joints/b2Joint.h> 
   70     const b2Vec2& GetLinearOffset() 
const;
 
   74     float32 GetAngularOffset() 
const;
 
  104     void SolveVelocityConstraints(
const b2SolverData& data);
 
  105     bool SolvePositionConstraints(
const b2SolverData& data);
 
  109     float32 m_angularOffset;
 
  111     float32 m_angularImpulse;
 
  114     float32 m_correctionFactor;
 
  124     float32 m_angularError;
 
  130     float32 m_angularMass;
 
b2Vec2 GetAnchorA() const 
Get the anchor point on bodyA in world coordinates. 
Definition: b2MotorJoint.cpp:206
b2Body * bodyA
The first attached body. 
Definition: b2Joint.h:92
Definition: b2MotorJoint.h:59
void SetMaxTorque(float32 torque)
Set the maximum friction torque in N*m. 
Definition: b2MotorJoint.cpp:237
void Dump()
Dump to b2Log. 
Definition: b2MotorJoint.cpp:289
void SetLinearOffset(const b2Vec2 &linearOffset)
Set/get the target linear offset, in frame A, in meters. 
Definition: b2MotorJoint.cpp:259
float32 GetMaxTorque() const 
Get the maximum friction torque in N*m. 
Definition: b2MotorJoint.cpp:243
b2Body * bodyB
The second attached body. 
Definition: b2Joint.h:95
b2Vec2 GetAnchorB() const 
Get the anchor point on bodyB in world coordinates. 
Definition: b2MotorJoint.cpp:211
void SetMaxForce(float32 force)
Set the maximum friction force in N. 
Definition: b2MotorJoint.cpp:226
float32 maxTorque
The maximum motor torque in N-m. 
Definition: b2MotorJoint.h:50
Motor joint definition. 
Definition: b2MotorJoint.h:25
Definition: b2Joint.h:103
void SetZero()
Set this vector to all zeros. 
Definition: b2Math.h:62
float32 angularOffset
The bodyB angle minus bodyA angle in radians. 
Definition: b2MotorJoint.h:44
b2Vec2 GetReactionForce(float32 inv_dt) const 
Get the reaction force on bodyB at the joint anchor in Newtons. 
Definition: b2MotorJoint.cpp:216
float32 GetMaxForce() const 
Get the maximum friction force in N. 
Definition: b2MotorJoint.cpp:232
b2JointType type
The joint type is set automatically for concrete joint types. 
Definition: b2Joint.h:86
float32 GetReactionTorque(float32 inv_dt) const 
Get the reaction torque on bodyB in N*m. 
Definition: b2MotorJoint.cpp:221
Solver Data. 
Definition: b2TimeStep.h:63
float32 maxForce
The maximum motor force in N. 
Definition: b2MotorJoint.h:47
A 2-by-2 matrix. Stored in column-major order. 
Definition: b2Math.h:183
float32 correctionFactor
Position correction factor in the range [0,1]. 
Definition: b2MotorJoint.h:53
Joint definitions are used to construct joints. 
Definition: b2Joint.h:74
A rigid body. These are created via b2World::CreateBody. 
Definition: b2Body.h:126
float32 GetCorrectionFactor() const 
Get the position correction factor in the range [0,1]. 
Definition: b2MotorJoint.cpp:254
void SetCorrectionFactor(float32 factor)
Set the position correction factor in the range [0,1]. 
Definition: b2MotorJoint.cpp:248
A 2D column vector. 
Definition: b2Math.h:53
void SetAngularOffset(float32 angularOffset)
Set/get the target angular offset, in radians. 
Definition: b2MotorJoint.cpp:274
b2Vec2 linearOffset
Position of bodyB minus the position of bodyA, in bodyA's frame, in meters. 
Definition: b2MotorJoint.h:41
void Initialize(b2Body *bodyA, b2Body *bodyB)
Initialize the bodies and offsets using the current transforms. 
Definition: b2MotorJoint.cpp:35