ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::BallAndSocketJointComponents Class Reference

This class represent the component of the ECS with data for the BallAndSocketJoint. More...

#include <include/reactphysics3d/components/BallAndSocketJointComponents.h>

Inheritance diagram for reactphysics3d::BallAndSocketJointComponents:
reactphysics3d::Components

Classes

struct  BallAndSocketJointComponent
 Structure for the data of a transform component. More...
 

Public Member Functions

 BallAndSocketJointComponents (MemoryAllocator &allocator)
 Constructor.
 
virtual ~BallAndSocketJointComponents () override=default
 Destructor.
 
void addComponent (Entity jointEntity, bool isDisabled, const BallAndSocketJointComponent &component)
 Add a component.
 
BallAndSocketJointgetJoint (Entity jointEntity) const
 Return a pointer to a given joint.
 
void setJoint (Entity jointEntity, BallAndSocketJoint *joint) const
 Set the joint pointer to a given joint.
 
const Vector3getLocalAnchorPointBody1 (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 Vector3getLocalAnchorPointBody2 (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 Vector3getR1World (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 Vector3getR2World (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 Matrix3x3getI1 (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 Matrix3x3getI2 (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)
 
Vector3getBiasVector (Entity jointEntity)
 Return the bias vector for the constraint.
 
void setBiasVector (Entity jointEntity, const Vector3 &biasVector)
 Set the bias vector for the constraint.
 
Matrix3x3getInverseMassMatrix (Entity jointEntity)
 Return the inverse mass matrix K=JM^-1J^-t of the constraint.
 
void setInverseMassMatrix (Entity jointEntity, const Matrix3x3 &inverseMassMatrix)
 Set the inverse mass matrix K=JM^-1J^-t of the constraint.
 
Vector3getImpulse (Entity jointEntity)
 Return the accumulated impulse.
 
void setImpulse (Entity jointEntity, const Vector3 &impulse)
 Set the accumulated impulse.
 
bool getIsConeLimitEnabled (Entity jointEntity) const
 Return true if the cone limit is enabled.
 
void setIsConeLimitEnabled (Entity jointEntity, bool isLimitEnabled)
 Set to true if the cone limit is enabled.
 
bool getConeLimitImpulse (Entity jointEntity) const
 Return the cone limit impulse.
 
void setConeLimitImpulse (Entity jointEntity, decimal impulse)
 Set the cone limit impulse.
 
decimal getConeLimitHalfAngle (Entity jointEntity) const
 Return the cone limit half angle.
 
void setConeLimitHalfAngle (Entity jointEntity, decimal halfAngle)
 Set the cone limit half angle.
 
bool getInverseMassMatrixConeLimit (Entity jointEntity) const
 Return the inverse mass matrix cone limit.
 
void setInverseMassMatrixConeLimit (Entity jointEntity, decimal inverseMassMatrix)
 Set the inverse mass matrix cone limit.
 
Vector3 getConeLimitLocalAxisBody1 (Entity jointEntity) const
 Get the cone limit local axis of body 1.
 
void setConeLimitLocalAxisBody1 (Entity jointEntity, const Vector3 &localAxisBody1)
 Set the cone limit local axis of body 1.
 
Vector3 getConeLimitLocalAxisBody2 (Entity jointEntity) const
 Get the cone limit local axis of body 2.
 
void setConeLimitLocalAxisBody2 (Entity jointEntity, const Vector3 &localAxisBody2)
 Set the cone limit local axis of body 2.
 
- 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.
 

Detailed Description

This class represent the component of the ECS with data for the BallAndSocketJoint.


The documentation for this class was generated from the following files: