#include <b2PrismaticJoint.h>
Public Member Functions | |
void | Dump () |
Dump to b2Log. | |
void | EnableLimit (bool flag) |
Enable/disable the joint limit. | |
void | EnableMotor (bool flag) |
Enable/disable the joint motor. | |
b2Vec2 | GetAnchorA () const |
Get the anchor point on bodyA in world coordinates. | |
b2Vec2 | GetAnchorB () const |
Get the anchor point on bodyB in world coordinates. | |
float32 | GetJointSpeed () const |
Get the current joint translation speed, usually in meters per second. | |
float32 | GetJointTranslation () const |
Get the current joint translation, usually in meters. | |
const b2Vec2 & | GetLocalAnchorA () const |
The local anchor point relative to bodyA's origin. | |
const b2Vec2 & | GetLocalAnchorB () const |
The local anchor point relative to bodyB's origin. | |
const b2Vec2 & | GetLocalAxisA () const |
The local joint axis relative to bodyA. | |
float32 | GetLowerLimit () const |
Get the lower joint limit, usually in meters. | |
float32 | GetMaxMotorForce () const |
float32 | GetMotorForce (float32 inv_dt) const |
Get the current motor force given the inverse time step, usually in N. | |
float32 | GetMotorSpeed () const |
Get the motor speed, usually in meters per second. | |
b2Vec2 | GetReactionForce (float32 inv_dt) const |
Get the reaction force on bodyB at the joint anchor in Newtons. | |
float32 | GetReactionTorque (float32 inv_dt) const |
Get the reaction torque on bodyB in N*m. | |
float32 | GetReferenceAngle () const |
Get the reference angle. | |
float32 | GetUpperLimit () const |
Get the upper joint limit, usually in meters. | |
bool | IsLimitEnabled () const |
Is the joint limit enabled? | |
bool | IsMotorEnabled () const |
Is the joint motor enabled? | |
void | SetLimits (float32 lower, float32 upper) |
Set the joint limits, usually in meters. | |
void | SetMaxMotorForce (float32 force) |
Set the maximum motor force, usually in N. | |
void | SetMotorSpeed (float32 speed) |
Set the motor speed, usually in meters per second. | |
Protected Member Functions | |
b2PrismaticJoint (const b2PrismaticJointDef *def) | |
void | InitVelocityConstraints (const b2SolverData &data) |
bool | SolvePositionConstraints (const b2SolverData &data) |
void | SolveVelocityConstraints (const b2SolverData &data) |
Protected Attributes | |
float32 | m_a1 |
float32 | m_a2 |
b2Vec2 | m_axis |
bool | m_enableLimit |
bool | m_enableMotor |
b2Vec3 | m_impulse |
int32 | m_indexA |
int32 | m_indexB |
float32 | m_invIA |
float32 | m_invIB |
float32 | m_invMassA |
float32 | m_invMassB |
b2Mat33 | m_K |
b2LimitState | m_limitState |
b2Vec2 | m_localAnchorA |
b2Vec2 | m_localAnchorB |
b2Vec2 | m_localCenterA |
b2Vec2 | m_localCenterB |
b2Vec2 | m_localXAxisA |
b2Vec2 | m_localYAxisA |
float32 | m_lowerTranslation |
float32 | m_maxMotorForce |
float32 | m_motorImpulse |
float32 | m_motorMass |
float32 | m_motorSpeed |
b2Vec2 | m_perp |
float32 | m_referenceAngle |
float32 | m_s1 |
float32 | m_s2 |
float32 | m_upperTranslation |
Friends | |
class | b2GearJoint |
class | b2Joint |
A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
Definition at line 86 of file b2PrismaticJoint.h.
b2PrismaticJoint::b2PrismaticJoint | ( | const b2PrismaticJointDef * | def | ) | [protected] |
Definition at line 100 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::Dump | ( | ) | [virtual] |
void b2PrismaticJoint::EnableLimit | ( | bool | flag | ) |
Enable/disable the joint limit.
Definition at line 544 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::EnableMotor | ( | bool | flag | ) |
Enable/disable the joint motor.
Definition at line 583 of file b2PrismaticJoint.cpp.
b2Vec2 b2PrismaticJoint::GetAnchorA | ( | ) | const [virtual] |
Get the anchor point on bodyA in world coordinates.
Implements b2Joint.
Definition at line 487 of file b2PrismaticJoint.cpp.
b2Vec2 b2PrismaticJoint::GetAnchorB | ( | ) | const [virtual] |
Get the anchor point on bodyB in world coordinates.
Implements b2Joint.
Definition at line 492 of file b2PrismaticJoint.cpp.
float32 b2PrismaticJoint::GetJointSpeed | ( | ) | const |
Get the current joint translation speed, usually in meters per second.
Definition at line 518 of file b2PrismaticJoint.cpp.
float32 b2PrismaticJoint::GetJointTranslation | ( | ) | const |
Get the current joint translation, usually in meters.
Definition at line 507 of file b2PrismaticJoint.cpp.
const b2Vec2& b2PrismaticJoint::GetLocalAnchorA | ( | ) | const [inline] |
The local anchor point relative to bodyA's origin.
Definition at line 96 of file b2PrismaticJoint.h.
const b2Vec2& b2PrismaticJoint::GetLocalAnchorB | ( | ) | const [inline] |
The local anchor point relative to bodyB's origin.
Definition at line 99 of file b2PrismaticJoint.h.
const b2Vec2& b2PrismaticJoint::GetLocalAxisA | ( | ) | const [inline] |
The local joint axis relative to bodyA.
Definition at line 102 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::GetLowerLimit | ( | ) | const |
Get the lower joint limit, usually in meters.
Definition at line 555 of file b2PrismaticJoint.cpp.
float32 b2PrismaticJoint::GetMaxMotorForce | ( | ) | const [inline] |
Definition at line 142 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::GetMotorForce | ( | float32 | inv_dt | ) | const |
Get the current motor force given the inverse time step, usually in N.
Definition at line 604 of file b2PrismaticJoint.cpp.
float32 b2PrismaticJoint::GetMotorSpeed | ( | ) | const [inline] |
Get the motor speed, usually in meters per second.
Definition at line 191 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::GetReactionForce | ( | float32 | inv_dt | ) | const [virtual] |
Get the reaction force on bodyB at the joint anchor in Newtons.
Implements b2Joint.
Definition at line 497 of file b2PrismaticJoint.cpp.
float32 b2PrismaticJoint::GetReactionTorque | ( | float32 | inv_dt | ) | const [virtual] |
Get the reaction torque on bodyB in N*m.
Implements b2Joint.
Definition at line 502 of file b2PrismaticJoint.cpp.
float32 b2PrismaticJoint::GetReferenceAngle | ( | ) | const [inline] |
Get the reference angle.
Definition at line 105 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::GetUpperLimit | ( | ) | const |
Get the upper joint limit, usually in meters.
Definition at line 560 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::InitVelocityConstraints | ( | const b2SolverData & | data | ) | [protected, virtual] |
Implements b2Joint.
Definition at line 126 of file b2PrismaticJoint.cpp.
bool b2PrismaticJoint::IsLimitEnabled | ( | ) | const |
Is the joint limit enabled?
Definition at line 539 of file b2PrismaticJoint.cpp.
bool b2PrismaticJoint::IsMotorEnabled | ( | ) | const |
Is the joint motor enabled?
Definition at line 578 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::SetLimits | ( | float32 | lower, |
float32 | upper | ||
) |
Set the joint limits, usually in meters.
Definition at line 565 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::SetMaxMotorForce | ( | float32 | force | ) |
Set the maximum motor force, usually in N.
Definition at line 597 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::SetMotorSpeed | ( | float32 | speed | ) |
Set the motor speed, usually in meters per second.
Definition at line 590 of file b2PrismaticJoint.cpp.
bool b2PrismaticJoint::SolvePositionConstraints | ( | const b2SolverData & | data | ) | [protected, virtual] |
Implements b2Joint.
Definition at line 363 of file b2PrismaticJoint.cpp.
void b2PrismaticJoint::SolveVelocityConstraints | ( | const b2SolverData & | data | ) | [protected, virtual] |
Implements b2Joint.
Definition at line 266 of file b2PrismaticJoint.cpp.
friend class b2GearJoint [friend] |
Reimplemented from b2Joint.
Definition at line 152 of file b2PrismaticJoint.h.
friend class b2Joint [friend] |
Definition at line 151 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_a1 [protected] |
Definition at line 186 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_a2 [protected] |
Definition at line 186 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_axis [protected] |
Definition at line 184 of file b2PrismaticJoint.h.
bool b2PrismaticJoint::m_enableLimit [protected] |
Definition at line 171 of file b2PrismaticJoint.h.
bool b2PrismaticJoint::m_enableMotor [protected] |
Definition at line 172 of file b2PrismaticJoint.h.
b2Vec3 b2PrismaticJoint::m_impulse [protected] |
Definition at line 165 of file b2PrismaticJoint.h.
int32 b2PrismaticJoint::m_indexA [protected] |
Definition at line 176 of file b2PrismaticJoint.h.
int32 b2PrismaticJoint::m_indexB [protected] |
Definition at line 177 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_invIA [protected] |
Definition at line 182 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_invIB [protected] |
Definition at line 183 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_invMassA [protected] |
Definition at line 180 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_invMassB [protected] |
Definition at line 181 of file b2PrismaticJoint.h.
b2Mat33 b2PrismaticJoint::m_K [protected] |
Definition at line 187 of file b2PrismaticJoint.h.
b2LimitState b2PrismaticJoint::m_limitState [protected] |
Definition at line 173 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_localAnchorA [protected] |
Definition at line 160 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_localAnchorB [protected] |
Definition at line 161 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_localCenterA [protected] |
Definition at line 178 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_localCenterB [protected] |
Definition at line 179 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_localXAxisA [protected] |
Definition at line 162 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_localYAxisA [protected] |
Definition at line 163 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_lowerTranslation [protected] |
Definition at line 167 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_maxMotorForce [protected] |
Definition at line 169 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_motorImpulse [protected] |
Definition at line 166 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_motorMass [protected] |
Definition at line 188 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_motorSpeed [protected] |
Definition at line 170 of file b2PrismaticJoint.h.
b2Vec2 b2PrismaticJoint::m_perp [protected] |
Definition at line 184 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_referenceAngle [protected] |
Definition at line 164 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_s1 [protected] |
Definition at line 185 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_s2 [protected] |
Definition at line 185 of file b2PrismaticJoint.h.
float32 b2PrismaticJoint::m_upperTranslation [protected] |
Definition at line 168 of file b2PrismaticJoint.h.