ReactPhysics3D: reactphysics3d::TransformComponents Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
reactphysics3d::TransformComponents Class Reference

This class represent the component of the ECS that contains the transforms of the different entities. More...

`#include <include/reactphysics3d/components/TransformComponents.h>`

Inheritance diagram for reactphysics3d::TransformComponents:

## Classes
struct | TransformComponent
| Structure for the data of a transform component. More...

## Public Member Functions
| TransformComponents (MemoryAllocator &allocator)
| Constructor.
virtual | ~TransformComponents () override=default
| Destructor.
void | addComponent (Entity bodyEntity, bool isDisabled, const TransformComponent &component)
| Add a component.
Transform & | getTransform (Entity bodyEntity) const
| Return the transform of an entity.
void | setTransform (Entity bodyEntity, const Transform &transform)
| Set the transform of an entity.
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 that contains the transforms of the different entities.

The position and orientation of the bodies are stored there. The components of the sleeping entities (bodies) are always stored at the end of the array.

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

- include/reactphysics3d/components/TransformComponents.h
- src/components/TransformComponents.cpp