![]() |
ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This abstract class represents a joint between two bodies. More...
#include <include/reactphysics3d/constraint/Joint.h>
Public Member Functions | |
| 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. | |
| virtual Vector3 | getReactionForce (decimal timeStep) const =0 |
| Return the force (in Newtons) on body 2 required to satisfy the joint constraint. | |
| virtual Vector3 | getReactionTorque (decimal timeStep) const =0 |
| Return the torque (in Newtons * meters) on body 2 required to satisfy the joint 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. | |
| virtual std::string | to_string () const =0 |
| Return a string representation. | |
This abstract class represents a joint between two bodies.
| RigidBody * Joint::getBody1 | ( | ) | const |
Return the reference to the body 1.
| RigidBody * Joint::getBody2 | ( | ) | const |
Return the reference to the body 2.
| RP3D_FORCE_INLINE Entity reactphysics3d::Joint::getEntity | ( | ) | const |
Return the entity id of the joint.
|
pure virtual |
Return the force (in Newtons) on body 2 required to satisfy the joint constraint.
Implemented in reactphysics3d::BallAndSocketJoint, reactphysics3d::FixedJoint, reactphysics3d::HingeJoint, and reactphysics3d::SliderJoint.
|
pure virtual |
Return the torque (in Newtons * meters) on body 2 required to satisfy the joint constraint.
Implemented in reactphysics3d::BallAndSocketJoint, reactphysics3d::FixedJoint, reactphysics3d::HingeJoint, and reactphysics3d::SliderJoint.
| JointType Joint::getType | ( | ) | const |
Return the type of the constraint.
| bool Joint::isCollisionEnabled | ( | ) | const |
Return true if the collision between the two bodies of the joint is enabled.
|
pure virtual |
Return a string representation.
Implemented in reactphysics3d::BallAndSocketJoint, reactphysics3d::FixedJoint, reactphysics3d::HingeJoint, and reactphysics3d::SliderJoint.