#include <b2MotorJoint.h>
Public Member Functions | |
void | Dump () |
Dump to b2Log. More... | |
b2Vec2 | GetAnchorA () const |
Get the anchor point on bodyA in world coordinates. More... | |
b2Vec2 | GetAnchorB () const |
Get the anchor point on bodyB in world coordinates. More... | |
float32 | GetAngularOffset () const |
float32 | GetCorrectionFactor () const |
Get the position correction factor in the range [0,1]. More... | |
const b2Vec2 & | GetLinearOffset () const |
float32 | GetMaxForce () const |
Get the maximum friction force in N. More... | |
float32 | GetMaxTorque () const |
Get the maximum friction torque in N*m. More... | |
b2Vec2 | GetReactionForce (float32 inv_dt) const |
Get the reaction force on bodyB at the joint anchor in Newtons. More... | |
float32 | GetReactionTorque (float32 inv_dt) const |
Get the reaction torque on bodyB in N*m. More... | |
void | SetAngularOffset (float32 angularOffset) |
Set/get the target angular offset, in radians. More... | |
void | SetCorrectionFactor (float32 factor) |
Set the position correction factor in the range [0,1]. More... | |
void | SetLinearOffset (const b2Vec2 &linearOffset) |
Set/get the target linear offset, in frame A, in meters. More... | |
void | SetMaxForce (float32 force) |
Set the maximum friction force in N. More... | |
void | SetMaxTorque (float32 torque) |
Set the maximum friction torque in N*m. More... | |
Public Member Functions inherited from b2Joint | |
b2Body * | GetBodyA () |
Get the first body attached to this joint. More... | |
b2Body * | GetBodyB () |
Get the second body attached to this joint. More... | |
bool | GetCollideConnected () const |
b2Joint * | GetNext () |
Get the next joint the world joint list. More... | |
const b2Joint * | GetNext () const |
b2JointType | GetType () const |
Get the type of the concrete joint. More... | |
void * | GetUserData () const |
Get the user data pointer. More... | |
bool | IsActive () const |
Short-cut function to determine if either body is inactive. More... | |
void | SetUserData (void *data) |
Set the user data pointer. More... | |
virtual void | ShiftOrigin (const b2Vec2 &newOrigin) |
Shift the origin for any points stored in world coordinates. More... | |
Protected Member Functions | |
b2MotorJoint (const b2MotorJointDef *def) | |
void | InitVelocityConstraints (const b2SolverData &data) |
bool | SolvePositionConstraints (const b2SolverData &data) |
void | SolveVelocityConstraints (const b2SolverData &data) |
Protected Member Functions inherited from b2Joint | |
b2Joint (const b2JointDef *def) | |
virtual | ~b2Joint () |
Protected Attributes | |
float32 | m_angularError |
float32 | m_angularImpulse |
float32 | m_angularMass |
float32 | m_angularOffset |
float32 | m_correctionFactor |
int32 | m_indexA |
int32 | m_indexB |
float32 | m_invIA |
float32 | m_invIB |
float32 | m_invMassA |
float32 | m_invMassB |
b2Vec2 | m_linearError |
b2Vec2 | m_linearImpulse |
b2Mat22 | m_linearMass |
b2Vec2 | m_linearOffset |
b2Vec2 | m_localCenterA |
b2Vec2 | m_localCenterB |
float32 | m_maxForce |
float32 | m_maxTorque |
b2Vec2 | m_rA |
b2Vec2 | m_rB |
Protected Attributes inherited from b2Joint | |
b2Body * | m_bodyA |
b2Body * | m_bodyB |
bool | m_collideConnected |
b2JointEdge | m_edgeA |
b2JointEdge | m_edgeB |
int32 | m_index |
bool | m_islandFlag |
b2Joint * | m_next |
b2Joint * | m_prev |
b2JointType | m_type |
void * | m_userData |
Friends | |
class | b2Joint |
Additional Inherited Members | |
Static Protected Member Functions inherited from b2Joint | |
static b2Joint * | Create (const b2JointDef *def, b2BlockAllocator *allocator) |
static void | Destroy (b2Joint *joint, b2BlockAllocator *allocator) |
A motor joint is used to control the relative motion between two bodies. A typical usage is to control the movement of a dynamic body with respect to the ground.
Definition at line 59 of file b2MotorJoint.h.
|
protected |
Definition at line 47 of file b2MotorJoint.cpp.
|
virtual |
|
virtual |
Get the anchor point on bodyA in world coordinates.
Implements b2Joint.
Definition at line 206 of file b2MotorJoint.cpp.
|
virtual |
Get the anchor point on bodyB in world coordinates.
Implements b2Joint.
Definition at line 211 of file b2MotorJoint.cpp.
float32 b2MotorJoint::GetAngularOffset | ( | ) | const |
Definition at line 284 of file b2MotorJoint.cpp.
float32 b2MotorJoint::GetCorrectionFactor | ( | ) | const |
Get the position correction factor in the range [0,1].
Definition at line 254 of file b2MotorJoint.cpp.
Definition at line 269 of file b2MotorJoint.cpp.
float32 b2MotorJoint::GetMaxForce | ( | ) | const |
Get the maximum friction force in N.
Definition at line 232 of file b2MotorJoint.cpp.
float32 b2MotorJoint::GetMaxTorque | ( | ) | const |
Get the maximum friction torque in N*m.
Definition at line 243 of file b2MotorJoint.cpp.
Get the reaction force on bodyB at the joint anchor in Newtons.
Implements b2Joint.
Definition at line 216 of file b2MotorJoint.cpp.
Get the reaction torque on bodyB in N*m.
Implements b2Joint.
Definition at line 221 of file b2MotorJoint.cpp.
|
protectedvirtual |
Implements b2Joint.
Definition at line 61 of file b2MotorJoint.cpp.
Set/get the target angular offset, in radians.
Definition at line 274 of file b2MotorJoint.cpp.
Set the position correction factor in the range [0,1].
Definition at line 248 of file b2MotorJoint.cpp.
Set/get the target linear offset, in frame A, in meters.
Definition at line 259 of file b2MotorJoint.cpp.
Set the maximum friction force in N.
Definition at line 226 of file b2MotorJoint.cpp.
Set the maximum friction torque in N*m.
Definition at line 237 of file b2MotorJoint.cpp.
|
protectedvirtual |
Implements b2Joint.
Definition at line 199 of file b2MotorJoint.cpp.
|
protectedvirtual |
Implements b2Joint.
Definition at line 141 of file b2MotorJoint.cpp.
|
friend |
Definition at line 99 of file b2MotorJoint.h.
|
protected |
Definition at line 124 of file b2MotorJoint.h.
|
protected |
Definition at line 111 of file b2MotorJoint.h.
|
protected |
Definition at line 130 of file b2MotorJoint.h.
|
protected |
Definition at line 109 of file b2MotorJoint.h.
|
protected |
Definition at line 114 of file b2MotorJoint.h.
|
protected |
Definition at line 117 of file b2MotorJoint.h.
|
protected |
Definition at line 118 of file b2MotorJoint.h.
|
protected |
Definition at line 127 of file b2MotorJoint.h.
|
protected |
Definition at line 128 of file b2MotorJoint.h.
|
protected |
Definition at line 125 of file b2MotorJoint.h.
|
protected |
Definition at line 126 of file b2MotorJoint.h.
|
protected |
Definition at line 123 of file b2MotorJoint.h.
|
protected |
Definition at line 110 of file b2MotorJoint.h.
|
protected |
Definition at line 129 of file b2MotorJoint.h.
|
protected |
Definition at line 108 of file b2MotorJoint.h.
|
protected |
Definition at line 121 of file b2MotorJoint.h.
|
protected |
Definition at line 122 of file b2MotorJoint.h.
|
protected |
Definition at line 112 of file b2MotorJoint.h.
|
protected |
Definition at line 113 of file b2MotorJoint.h.
|
protected |
Definition at line 119 of file b2MotorJoint.h.
|
protected |
Definition at line 120 of file b2MotorJoint.h.