![]() |
ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This class represent the component of the ECS with data for the SliderJoint. More...
#include <include/reactphysics3d/components/SliderJointComponents.h>
Classes | |
| struct | SliderJointComponent |
| Structure for the data of a transform component. More... | |
Public Member Functions | |
| SliderJointComponents (MemoryAllocator &allocator) | |
| Constructor. | |
| virtual | ~SliderJointComponents () override=default |
| Destructor. | |
| void | addComponent (Entity jointEntity, bool isDisabled, const SliderJointComponent &component) |
| Add a component. | |
| SliderJoint * | getJoint (Entity jointEntity) const |
| Return a pointer to a given joint. | |
| void | setJoint (Entity jointEntity, SliderJoint *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 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) | |
| Vector2 & | getImpulseTranslation (Entity jointEntity) |
| Return the translation impulse. | |
| void | setImpulseTranslation (Entity jointEntity, const Vector2 &impulseTranslation) |
| Set the translation impulse. | |
| Vector3 & | getImpulseRotation (Entity jointEntity) |
| Return the translation impulse. | |
| void | setImpulseRotation (Entity jointEntity, const Vector3 &impulseTranslation) |
| Set the translation impulse. | |
| Matrix2x2 & | getInverseMassMatrixTranslation (Entity jointEntity) |
| Return the translation inverse mass matrix of the constraint. | |
| void | setInverseMassMatrixTranslation (Entity jointEntity, const Matrix2x2 &inverseMassMatrix) |
| Set the translation inverse mass matrix of the constraint. | |
| Matrix3x3 & | getInverseMassMatrixRotation (Entity jointEntity) |
| Return the rotation inverse mass matrix of the constraint. | |
| void | setInverseMassMatrixRotation (Entity jointEntity, const Matrix3x3 &inverseMassMatrix) |
| Set the rotation inverse mass matrix of the constraint. | |
| Vector2 & | getBiasTranslation (Entity jointEntity) |
| Return the translation bias. | |
| void | setBiasTranslation (Entity jointEntity, const Vector2 &impulseTranslation) |
| Set the translation impulse. | |
| Vector3 & | getBiasRotation (Entity jointEntity) |
| Return the rotation bias. | |
| void | setBiasRotation (Entity jointEntity, const Vector3 &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 & | getSliderAxisBody1 (Entity jointEntity) |
| Return the slider axis (in local-space coordinates of body 1) | |
| void | setSliderAxisBody1 (Entity jointEntity, const Vector3 &sliderAxisBody1) |
| Set the slider axis (in local-space coordinates of body 1) | |
| Vector3 & | getSliderAxisWorld (Entity jointEntity) |
| Retunr the slider axis in world-space coordinates. | |
| void | setSliderAxisWorld (Entity jointEntity, const Vector3 &sliderAxisWorld) |
| Set the slider axis in world-space coordinates. | |
| Vector3 & | getR1 (Entity jointEntity) |
| Return the vector r1 in world-space coordinates. | |
| void | setR1 (Entity jointEntity, const Vector3 &r1) |
| Set the vector r1 in world-space coordinates. | |
| Vector3 & | getR2 (Entity jointEntity) |
| Return the vector r2 in world-space coordinates. | |
| void | setR2 (Entity jointEntity, const Vector3 &r2) |
| Set the vector r2 in world-space coordinates. | |
| Vector3 & | getN1 (Entity jointEntity) |
| Return the first vector orthogonal to the slider axis local-space of body 1. | |
| void | setN1 (Entity jointEntity, const Vector3 &n1) |
| Set the first vector orthogonal to the slider axis local-space of body 1. | |
| Vector3 & | getN2 (Entity jointEntity) |
| Return the second vector orthogonal to the slider axis and mN1 in local-space of body 1. | |
| void | setN2 (Entity jointEntity, const Vector3 &n2) |
| Set the second vector orthogonal to the slider axis and mN1 in local-space of body 1. | |
| 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 | getInverseMassMatrixLimit (Entity jointEntity) const |
| Return the inverse of mass matrix K=JM^-1J^t for the limits (1x1 matrix) | |
| void | setInverseMassMatrixLimit (Entity jointEntity, decimal inverseMassMatrixLimitMotor) |
| Set the inverse of mass matrix K=JM^-1J^t for the limits (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 | getMaxMotorForce (Entity jointEntity) const |
| Return the maximum motor force (in Newtons) that can be applied to reach to desired motor speed. | |
| void | setMaxMotorForce (Entity jointEntity, decimal maxMotorForce) |
| Set the maximum motor force (in Newtons) that can be applied to reach to desired motor speed. | |
| Vector3 & | getR2CrossN1 (Entity jointEntity) |
| Return the cross product of r2 and n1. | |
| void | setR2CrossN1 (Entity jointEntity, const Vector3 &r2CrossN1) |
| Set the cross product of r2 and n1. | |
| Vector3 & | getR2CrossN2 (Entity jointEntity) |
| Return the cross product of r2 and n2. | |
| void | setR2CrossN2 (Entity jointEntity, const Vector3 &r2CrossN2) |
| Set the cross product of r2 and n2. | |
| Vector3 & | getR2CrossSliderAxis (Entity jointEntity) |
| Return the cross product of r2 and the slider axis. | |
| void | setR2CrossSliderAxis (Entity jointEntity, const Vector3 &r2CrossSliderAxis) |
| Set the cross product of r2 and the slider axis. | |
| Vector3 & | getR1PlusUCrossN1 (Entity jointEntity) |
| Return the cross product of vector (r1 + u) and n1. | |
| void | setR1PlusUCrossN1 (Entity jointEntity, const Vector3 &r1PlusUCrossN1) |
| Set the cross product of vector (r1 + u) and n1. | |
| Vector3 & | getR1PlusUCrossN2 (Entity jointEntity) |
| Return the cross product of vector (r1 + u) and n2. | |
| void | setR1PlusUCrossN2 (Entity jointEntity, const Vector3 &r1PlusUCrossN2) |
| Set the cross product of vector (r1 + u) and n2. | |
| Vector3 & | getR1PlusUCrossSliderAxis (Entity jointEntity) |
| Return the cross product of vector (r1 + u) and the slider axis. | |
| void | setR1PlusUCrossSliderAxis (Entity jointEntity, const Vector3 &r1PlusUCrossSliderAxis) |
| Set the cross product of vector (r1 + u) and the slider axis. | |
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 SliderJoint.