This class represents a hinge joint that allows arbitrary rotation between two bodies around a single axis.
More...
|
| HingeJoint (Entity entity, PhysicsWorld &world, const HingeJointInfo &jointInfo) |
| Constructor.
|
|
virtual | ~HingeJoint () override=default |
| Destructor.
|
|
| HingeJoint (const HingeJoint &constraint)=delete |
| Deleted copy-constructor.
|
|
HingeJoint & | operator= (const HingeJoint &constraint)=delete |
| Deleted assignment operator.
|
|
bool | isLimitEnabled () const |
| Return true if the limits or the joint are enabled.
|
|
bool | isMotorEnabled () const |
| Return true if the motor of the joint is enabled.
|
|
void | enableLimit (bool isLimitEnabled) |
| Enable/Disable the limits of the joint.
|
|
void | enableMotor (bool isMotorEnabled) |
| Enable/Disable the motor of the joint.
|
|
decimal | getMinAngleLimit () const |
| Return the minimum angle limit.
|
|
void | setMinAngleLimit (decimal lowerLimit) |
| Set the minimum angle limit.
|
|
decimal | getMaxAngleLimit () const |
| Return the maximum angle limit.
|
|
void | setMaxAngleLimit (decimal upperLimit) |
| Set the maximum angle limit.
|
|
decimal | getMotorSpeed () const |
| Return the motor speed.
|
|
void | setMotorSpeed (decimal motorSpeed) |
| Set the motor speed.
|
|
decimal | getMaxMotorTorque () const |
| Return the maximum motor torque.
|
|
void | setMaxMotorTorque (decimal maxMotorTorque) |
| Set the maximum motor torque.
|
|
decimal | getMotorTorque (decimal timeStep) const |
| Return the intensity of the current torque applied for the joint motor.
|
|
decimal | getAngle () const |
| Return the current hinge angle (in radians)
|
|
virtual Vector3 | getReactionForce (decimal timeStep) const override |
| Return the force (in Newtons) on body 2 required to satisfy the joint constraint in world-space.
|
|
virtual Vector3 | getReactionTorque (decimal timeStep) const override |
| Return the torque (in Newtons * meters) on body 2 required to satisfy the joint constraint in world-space.
|
|
virtual std::string | to_string () const override |
| Return a string representation.
|
|
| Joint (Entity entity, PhysicsWorld &world) |
| Constructor.
|
|
virtual | ~Joint ()=default |
| Destructor.
|
|
| Joint (const Joint &constraint)=delete |
| Deleted copy-constructor.
|
|
Joint & | operator= (const Joint &constraint)=delete |
| Deleted assignment operator.
|
|
RigidBody * | getBody1 () const |
| Return the reference to the body 1.
|
|
RigidBody * | getBody2 () const |
| Return the reference to the body 2.
|
|
JointType | getType () const |
| Return the type of the constraint.
|
|
bool | isCollisionEnabled () const |
| Return true if the collision between the two bodies of the joint is enabled.
|
|
Entity | getEntity () const |
| Return the entity id of the joint.
|
|
This class represents a hinge joint that allows arbitrary rotation between two bodies around a single axis.
This joint has one degree of freedom. It can be useful to simulate doors or pendulumns.