#include <b2WheelJoint.h>
Public Member Functions | |
void | Dump () |
Dump to b2Log. More... | |
void | EnableMotor (bool flag) |
Enable/disable the joint motor. 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 | GetJointSpeed () const |
Get the current joint translation speed, usually in meters per second. More... | |
float32 | GetJointTranslation () const |
Get the current joint translation, usually in meters. More... | |
const b2Vec2 & | GetLocalAnchorA () const |
The local anchor point relative to bodyA's origin. More... | |
const b2Vec2 & | GetLocalAnchorB () const |
The local anchor point relative to bodyB's origin. More... | |
const b2Vec2 & | GetLocalAxisA () const |
The local joint axis relative to bodyA. More... | |
float32 | GetMaxMotorTorque () const |
float32 | GetMotorSpeed () const |
Get the motor speed, usually in radians per second. More... | |
float32 | GetMotorTorque (float32 inv_dt) const |
Get the current motor torque given the inverse time step, usually 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... | |
float32 | GetSpringDampingRatio () const |
float32 | GetSpringFrequencyHz () const |
bool | IsMotorEnabled () const |
Is the joint motor enabled? More... | |
void | SetMaxMotorTorque (float32 torque) |
Set/Get the maximum motor force, usually in N-m. More... | |
void | SetMotorSpeed (float32 speed) |
Set the motor speed, usually in radians per second. More... | |
void | SetSpringDampingRatio (float32 ratio) |
Set/Get the spring damping ratio. More... | |
void | SetSpringFrequencyHz (float32 hz) |
Set/Get the spring frequency in hertz. Setting the frequency to zero disables the spring. 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 | |
b2WheelJoint (const b2WheelJointDef *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 () |
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 wheel joint. This joint provides two degrees of freedom: translation along an axis fixed in bodyA and rotation in the plane. In other words, it is a point to line constraint with a rotational motor and a linear spring/damper. This joint is designed for vehicle suspensions.
Definition at line 78 of file b2WheelJoint.h.
|
protected |
Definition at line 48 of file b2WheelJoint.cpp.
|
virtual |
void b2WheelJoint::EnableMotor | ( | bool | flag | ) |
Enable/disable the joint motor.
Definition at line 375 of file b2WheelJoint.cpp.
|
virtual |
Get the anchor point on bodyA in world coordinates.
Implements b2Joint.
Definition at line 329 of file b2WheelJoint.cpp.
|
virtual |
Get the anchor point on bodyB in world coordinates.
Implements b2Joint.
Definition at line 334 of file b2WheelJoint.cpp.
float32 b2WheelJoint::GetJointSpeed | ( | ) | const |
Get the current joint translation speed, usually in meters per second.
Definition at line 363 of file b2WheelJoint.cpp.
float32 b2WheelJoint::GetJointTranslation | ( | ) | const |
Get the current joint translation, usually in meters.
Definition at line 349 of file b2WheelJoint.cpp.
The local anchor point relative to bodyA's origin.
Definition at line 88 of file b2WheelJoint.h.
The local anchor point relative to bodyB's origin.
Definition at line 91 of file b2WheelJoint.h.
The local joint axis relative to bodyA.
Definition at line 94 of file b2WheelJoint.h.
|
inline |
Definition at line 185 of file b2WheelJoint.h.
|
inline |
Get the motor speed, usually in radians per second.
Definition at line 180 of file b2WheelJoint.h.
Get the current motor torque given the inverse time step, usually in N-m.
Definition at line 396 of file b2WheelJoint.cpp.
Get the reaction force on bodyB at the joint anchor in Newtons.
Implements b2Joint.
Definition at line 339 of file b2WheelJoint.cpp.
Get the reaction torque on bodyB in N*m.
Implements b2Joint.
Definition at line 344 of file b2WheelJoint.cpp.
|
inline |
Definition at line 205 of file b2WheelJoint.h.
|
inline |
Definition at line 195 of file b2WheelJoint.h.
|
protectedvirtual |
Implements b2Joint.
Definition at line 77 of file b2WheelJoint.cpp.
bool b2WheelJoint::IsMotorEnabled | ( | ) | const |
Is the joint motor enabled?
Definition at line 370 of file b2WheelJoint.cpp.
Set/Get the maximum motor force, usually in N-m.
Definition at line 389 of file b2WheelJoint.cpp.
Set the motor speed, usually in radians per second.
Definition at line 382 of file b2WheelJoint.cpp.
Set/Get the spring damping ratio.
Definition at line 200 of file b2WheelJoint.h.
Set/Get the spring frequency in hertz. Setting the frequency to zero disables the spring.
Definition at line 190 of file b2WheelJoint.h.
|
protectedvirtual |
Implements b2Joint.
Definition at line 280 of file b2WheelJoint.cpp.
|
protectedvirtual |
Implements b2Joint.
Definition at line 216 of file b2WheelJoint.cpp.
|
friend |
Definition at line 134 of file b2WheelJoint.h.
|
protected |
Definition at line 168 of file b2WheelJoint.h.
|
protected |
Definition at line 168 of file b2WheelJoint.h.
|
protected |
Definition at line 176 of file b2WheelJoint.h.
|
protected |
Definition at line 142 of file b2WheelJoint.h.
|
protected |
Definition at line 156 of file b2WheelJoint.h.
|
protected |
Definition at line 141 of file b2WheelJoint.h.
|
protected |
Definition at line 177 of file b2WheelJoint.h.
|
protected |
Definition at line 150 of file b2WheelJoint.h.
|
protected |
Definition at line 159 of file b2WheelJoint.h.
|
protected |
Definition at line 160 of file b2WheelJoint.h.
|
protected |
Definition at line 165 of file b2WheelJoint.h.
|
protected |
Definition at line 166 of file b2WheelJoint.h.
|
protected |
Definition at line 163 of file b2WheelJoint.h.
|
protected |
Definition at line 164 of file b2WheelJoint.h.
|
protected |
Definition at line 145 of file b2WheelJoint.h.
|
protected |
Definition at line 146 of file b2WheelJoint.h.
|
protected |
Definition at line 161 of file b2WheelJoint.h.
|
protected |
Definition at line 162 of file b2WheelJoint.h.
|
protected |
Definition at line 147 of file b2WheelJoint.h.
|
protected |
Definition at line 148 of file b2WheelJoint.h.
|
protected |
Definition at line 172 of file b2WheelJoint.h.
|
protected |
Definition at line 154 of file b2WheelJoint.h.
|
protected |
Definition at line 151 of file b2WheelJoint.h.
|
protected |
Definition at line 173 of file b2WheelJoint.h.
|
protected |
Definition at line 155 of file b2WheelJoint.h.
|
protected |
Definition at line 169 of file b2WheelJoint.h.
|
protected |
Definition at line 170 of file b2WheelJoint.h.
|
protected |
Definition at line 169 of file b2WheelJoint.h.
|
protected |
Definition at line 170 of file b2WheelJoint.h.
|
protected |
Definition at line 152 of file b2WheelJoint.h.
|
protected |
Definition at line 174 of file b2WheelJoint.h.