|  | ReactPhysics3D
    v0.10.2
    C++ Physics engine library | 
This class represents a slider joint. More...
#include <include/reactphysics3d/constraint/SliderJoint.h>
 
  
| Public Member Functions | |
| SliderJoint (Entity entity, PhysicsWorld &world, const SliderJointInfo &jointInfo) | |
| Constructor. | |
| virtual | ~SliderJoint () override=default | 
| Destructor. | |
| SliderJoint (const SliderJoint &constraint)=delete | |
| Deleted copy-constructor. | |
| SliderJoint & | operator= (const SliderJoint &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 | getTranslation () const | 
| Return the current translation value of the joint. | |
| decimal | getMinTranslationLimit () const | 
| Return the minimum translation limit. | |
| void | setMinTranslationLimit (decimal lowerLimit) | 
| Set the minimum translation limit. | |
| decimal | getMaxTranslationLimit () const | 
| Return the maximum translation limit. | |
| void | setMaxTranslationLimit (decimal upperLimit) | 
| Set the maximum translation limit. | |
| decimal | getMotorSpeed () const | 
| Return the motor speed. | |
| void | setMotorSpeed (decimal motorSpeed) | 
| Set the motor speed. | |
| decimal | getMaxMotorForce () const | 
| Return the maximum motor force. | |
| void | setMaxMotorForce (decimal maxMotorForce) | 
| Set the maximum motor force. | |
| decimal | getMotorForce (decimal timeStep) const | 
| Return the intensity of the current force applied for the joint motor. | |
| 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. | |
|  Public Member Functions inherited from reactphysics3d::Joint | |
| 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 slider joint.
This joint has a one degree of freedom. It only allows relative translation of the bodies along a single direction and no rotation.
| void SliderJoint::enableLimit | ( | bool | isLimitEnabled | ) | 
Enable/Disable the limits of the joint.
| isLimitEnabled | True if you want to enable the joint limits and false otherwise | 
| void SliderJoint::enableMotor | ( | bool | isMotorEnabled | ) | 
Enable/Disable the motor of the joint.
| isMotorEnabled | True if you want to enable the joint motor and false otherwise | 
| decimal SliderJoint::getMaxMotorForce | ( | ) | const | 
Return the maximum motor force.
| decimal SliderJoint::getMaxTranslationLimit | ( | ) | const | 
Return the maximum translation limit.
| decimal SliderJoint::getMinTranslationLimit | ( | ) | const | 
Return the minimum translation limit.
| decimal SliderJoint::getMotorForce | ( | decimal | timeStep | ) | const | 
Return the intensity of the current force applied for the joint motor.
| timeStep | Time step (in seconds) | 
| decimal SliderJoint::getMotorSpeed | ( | ) | const | 
Return the motor speed.
| 
 | overridevirtual | 
Return the force (in Newtons) on body 2 required to satisfy the joint constraint in world-space.
Implements reactphysics3d::Joint.
| 
 | overridevirtual | 
Return the torque (in Newtons * meters) on body 2 required to satisfy the joint constraint in world-space.
Implements reactphysics3d::Joint.
| decimal SliderJoint::getTranslation | ( | ) | const | 
Return the current translation value of the joint.
| bool SliderJoint::isLimitEnabled | ( | ) | const | 
Return true if the limits or the joint are enabled.
| bool SliderJoint::isMotorEnabled | ( | ) | const | 
Return true if the motor of the joint is enabled.
| void SliderJoint::setMaxMotorForce | ( | decimal | maxMotorForce | ) | 
Set the maximum motor force.
| maxMotorForce | The maximum force of the joint motor (in Newton x meters) | 
| void SliderJoint::setMaxTranslationLimit | ( | decimal | upperLimit | ) | 
Set the maximum translation limit.
| upperLimit | The maximum translation limit of the joint (in meters) | 
| void SliderJoint::setMinTranslationLimit | ( | decimal | lowerLimit | ) | 
Set the minimum translation limit.
| lowerLimit | The minimum translation limit of the joint (in meters) | 
| void SliderJoint::setMotorSpeed | ( | decimal | motorSpeed | ) | 
Set the motor speed.
| motorSpeed | The speed of the joint motor (in meters per second) | 
| 
 | overridevirtual | 
Return a string representation.
Implements reactphysics3d::Joint.