![]() |
ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This class represent the component of the ECS with data for the HingeJoint. More...
#include <include/reactphysics3d/components/HingeJointComponents.h>
Classes | |
| struct | HingeJointComponent |
| Structure for the data of a transform component. More... | |
Public Member Functions | |
| HingeJointComponents (MemoryAllocator &allocator) | |
| Constructor. | |
| virtual | ~HingeJointComponents () override=default |
| Destructor. | |
| void | addComponent (Entity jointEntity, bool isDisabled, const HingeJointComponent &component) |
| Add a component. | |
| HingeJoint * | getJoint (Entity jointEntity) const |
| Return a pointer to a given joint. | |
| void | setJoint (Entity jointEntity, HingeJoint *joint) const |
| Set the joint pointer to a given joint. | |
| const Vector3 & | getLocalAnchorPointBody1 (Entity jointEntity) const |
| Return the local anchor point of body 1 for a given joint. | |
| void | setLocalAnchorPointBody1 (Entity jointEntity, const Vector3 &localAnchoirPointBody1) |
| Set the local anchor point of body 1 for a given joint. | |
| const Vector3 & | getLocalAnchorPointBody2 (Entity jointEntity) const |
| Return the local anchor point of body 2 for a given joint. | |
| void | setLocalAnchorPointBody2 (Entity jointEntity, const Vector3 &localAnchoirPointBody2) |
| Set the local anchor point of body 2 for a given joint. | |
| const Vector3 & | getR1World (Entity jointEntity) const |
| Return the vector from center of body 1 to anchor point in world-space. | |
| void | setR1World (Entity jointEntity, const Vector3 &r1World) |
| Set the vector from center of body 1 to anchor point in world-space. | |
| const Vector3 & | getR2World (Entity jointEntity) const |
| Return the vector from center of body 2 to anchor point in world-space. | |
| void | setR2World (Entity jointEntity, const Vector3 &r2World) |
| Set the vector from center of body 2 to anchor point in world-space. | |
| const Matrix3x3 & | getI1 (Entity jointEntity) const |
| Return the inertia tensor of body 1 (in world-space coordinates) | |
| void | setI1 (Entity jointEntity, const Matrix3x3 &i1) |
| Set the inertia tensor of body 1 (in world-space coordinates) | |
| const Matrix3x3 & | getI2 (Entity jointEntity) const |
| Return the inertia tensor of body 2 (in world-space coordinates) | |
| void | setI2 (Entity jointEntity, const Matrix3x3 &i2) |
| Set the inertia tensor of body 2 (in world-space coordinates) | |
| Vector3 & | getImpulseTranslation (Entity jointEntity) |
| Return the translation impulse. | |
| void | setImpulseTranslation (Entity jointEntity, const Vector3 &impulseTranslation) |
| Set the translation impulse. | |
| Vector2 & | getImpulseRotation (Entity jointEntity) |
| Return the translation impulse. | |
| void | setImpulseRotation (Entity jointEntity, const Vector2 &impulseTranslation) |
| Set the translation impulse. | |
| Matrix3x3 & | getInverseMassMatrixTranslation (Entity jointEntity) |
| Return the translation inverse mass matrix of the constraint. | |
| void | setInverseMassMatrixTranslation (Entity jointEntity, const Matrix3x3 &inverseMassMatrix) |
| Set the translation inverse mass matrix of the constraint. | |
| Matrix2x2 & | getInverseMassMatrixRotation (Entity jointEntity) |
| Return the rotation inverse mass matrix of the constraint. | |
| void | setInverseMassMatrixRotation (Entity jointEntity, const Matrix2x2 &inverseMassMatrix) |
| Set the rotation inverse mass matrix of the constraint. | |
| Vector3 & | getBiasTranslation (Entity jointEntity) |
| Return the translation bias. | |
| void | setBiasTranslation (Entity jointEntity, const Vector3 &impulseTranslation) |
| Set the translation impulse. | |
| Vector2 & | getBiasRotation (Entity jointEntity) |
| Return the rotation bias. | |
| void | setBiasRotation (Entity jointEntity, const Vector2 &impulseRotation) |
| Set the rotation impulse. | |
| Quaternion & | getInitOrientationDifferenceInv (Entity jointEntity) |
| Return the initial orientation difference. | |
| void | setInitOrientationDifferenceInv (Entity jointEntity, const Quaternion &initOrientationDifferenceInv) |
| Set the rotation impulse. | |
| Vector3 & | getHingeLocalAxisBody1 (Entity jointEntity) |
| Return the hinge rotation axis (in local-space coordinates of body 1) | |
| void | setHingeLocalAxisBody1 (Entity jointEntity, const Vector3 &hingeLocalAxisBody1) |
| Set the hinge rotation axis (in local-space coordinates of body 1) | |
| Vector3 & | getHingeLocalAxisBody2 (Entity jointEntity) |
| Return the hinge rotation axis (in local-space coordiantes of body 2) | |
| void | setHingeLocalAxisBody2 (Entity jointEntity, const Vector3 &hingeLocalAxisBody2) |
| Set the hinge rotation axis (in local-space coordiantes of body 2) | |
| Vector3 & | getA1 (Entity jointEntity) |
| Return the hinge rotation axis (in world-space coordinates) computed from body 1. | |
| void | setA1 (Entity jointEntity, const Vector3 &a1) |
| Set the hinge rotation axis (in world-space coordinates) computed from body 1. | |
| Vector3 & | getB2CrossA1 (Entity jointEntity) |
| Return the cross product of vector b2 and a1. | |
| void | setB2CrossA1 (Entity jointEntity, const Vector3 &b2CrossA1) |
| Set the cross product of vector b2 and a1. | |
| Vector3 & | getC2CrossA1 (Entity jointEntity) |
| Return the cross product of vector c2 and a1;. | |
| void | setC2CrossA1 (Entity jointEntity, const Vector3 &c2CrossA1) |
| Set the cross product of vector c2 and a1;. | |
| decimal | getImpulseLowerLimit (Entity jointEntity) const |
| Return the accumulated impulse for the lower limit constraint. | |
| void | setImpulseLowerLimit (Entity jointEntity, decimal impulseLowerLimit) |
| Set the accumulated impulse for the lower limit constraint. | |
| decimal | getImpulseUpperLimit (Entity jointEntity) const |
| Return the accumulated impulse for the upper limit constraint. | |
| void | setImpulseUpperLimit (Entity jointEntity, decimal impulseUpperLimit) const |
| Set the accumulated impulse for the upper limit constraint. | |
| decimal | getImpulseMotor (Entity jointEntity) const |
| Return the accumulated impulse for the motor constraint;. | |
| void | setImpulseMotor (Entity jointEntity, decimal impulseMotor) |
| Set the accumulated impulse for the motor constraint;. | |
| decimal | getInverseMassMatrixLimitMotor (Entity jointEntity) const |
| Return the inverse of mass matrix K=JM^-1J^t for the limits and motor constraints (1x1 matrix) | |
| void | setInverseMassMatrixLimitMotor (Entity jointEntity, decimal inverseMassMatrixLimitMotor) |
| Set the inverse of mass matrix K=JM^-1J^t for the limits and motor constraints (1x1 matrix) | |
| decimal | getInverseMassMatrixMotor (Entity jointEntity) |
| Return the inverse of mass matrix K=JM^-1J^t for the motor. | |
| void | setInverseMassMatrixMotor (Entity jointEntity, decimal inverseMassMatrixMotor) |
| Set the inverse of mass matrix K=JM^-1J^t for the motor. | |
| decimal | getBLowerLimit (Entity jointEntity) const |
| Return the bias of the lower limit constraint. | |
| void | setBLowerLimit (Entity jointEntity, decimal bLowerLimit) const |
| Set the bias of the lower limit constraint. | |
| decimal | getBUpperLimit (Entity jointEntity) const |
| Return the bias of the upper limit constraint. | |
| void | setBUpperLimit (Entity jointEntity, decimal bUpperLimit) |
| Set the bias of the upper limit constraint. | |
| bool | getIsLimitEnabled (Entity jointEntity) const |
| Return true if the joint limits are enabled. | |
| void | setIsLimitEnabled (Entity jointEntity, bool isLimitEnabled) |
| Set to true if the joint limits are enabled. | |
| bool | getIsMotorEnabled (Entity jointEntity) const |
| Return true if the motor of the joint in enabled. | |
| void | setIsMotorEnabled (Entity jointEntity, bool isMotorEnabled) const |
| Set to true if the motor of the joint in enabled. | |
| decimal | getLowerLimit (Entity jointEntity) const |
| Return the Lower limit (minimum allowed rotation angle in radian) | |
| void | setLowerLimit (Entity jointEntity, decimal lowerLimit) const |
| Set the Lower limit (minimum allowed rotation angle in radian) | |
| decimal | getUpperLimit (Entity jointEntity) const |
| Return the upper limit (maximum translation distance) | |
| void | setUpperLimit (Entity jointEntity, decimal upperLimit) |
| Set the upper limit (maximum translation distance) | |
| bool | getIsLowerLimitViolated (Entity jointEntity) const |
| Return true if the lower limit is violated. | |
| void | setIsLowerLimitViolated (Entity jointEntity, bool isLowerLimitViolated) |
| Set to true if the lower limit is violated. | |
| bool | getIsUpperLimitViolated (Entity jointEntity) const |
| Return true if the upper limit is violated. | |
| void | setIsUpperLimitViolated (Entity jointEntity, bool isUpperLimitViolated) const |
| Set to true if the upper limit is violated. | |
| decimal | getMotorSpeed (Entity jointEntity) const |
| Return the motor speed (in rad/s) | |
| void | setMotorSpeed (Entity jointEntity, decimal motorSpeed) |
| Set the motor speed (in rad/s) | |
| decimal | getMaxMotorTorque (Entity jointEntity) const |
| Return the maximum motor torque (in Newtons) that can be applied to reach to desired motor speed. | |
| void | setMaxMotorTorque (Entity jointEntity, decimal maxMotorTorque) |
| Set the maximum motor torque (in Newtons) that can be applied to reach to desired motor speed. | |
Public Member Functions inherited from reactphysics3d::Components | |
| Components (MemoryAllocator &allocator, size_t componentDataSize, size_t alignmentMarginSize) | |
| Constructor. | |
| virtual | ~Components () |
| Destructor. | |
| void | init () |
| Initialize the components: | |
| void | removeComponent (Entity entity) |
| Remove a component. | |
| bool | getIsEntityDisabled (Entity entity) const |
| Return true if an entity is disabled. | |
| void | setIsEntityDisabled (Entity entity, bool isDisabled) |
| Notify if a given entity is disabled. | |
| bool | hasComponent (Entity entity) const |
| Return true if there is a component for a given entity. | |
| bool | hasComponentGetIndex (Entity entity, uint32 &entityIndex) const |
| Return true if there is a component for a given entiy and if so set the entity index. | |
| uint32 | getNbComponents () const |
| Return the number of components. | |
| uint32 | getNbEnabledComponents () const |
| Return the number of enabled components. | |
| uint32 | getEntityIndex (Entity entity) const |
| Return the index in the arrays for a given entity. | |
This class represent the component of the ECS with data for the HingeJoint.