An object containing components. More...
#include <ecsm.hpp>
Classes | |
| struct | ComponentData |
| Entity component data container. More... | |
Public Member Functions | |
| bool | destroy () |
| Destroys all entity components. | |
| const ComponentData * | getComponents () const noexcept |
| Returns entity components array. | |
| uint32_t | getComponentCount () const noexcept |
| Returns entity components array size. | |
| uint32_t | getComponentCapacity () const noexcept |
| Returns entity components array capacity. | |
| bool | hasComponents () const noexcept |
| Returns true if entity has components. | |
| const ComponentData * | findComponent (size_t type) const noexcept |
| Searches for the specified component type. | |
Friends | |
| class | Manager |
An object containing components.
The entity is a general-purpose object. It doesn't have any inherent behavior or data by itself. Instead, it serves as a container for components.
| struct ecsm::Entity::ComponentData |
| bool destroy | ( | ) |
Destroys all entity components.
|
inlinenoexcept |
Returns entity components array.
Use Manager to add or remove components.
|
inlinenoexcept |
Returns entity components array size.
Use Manager to add or remove components.
|
inlinenoexcept |
Returns entity components array capacity.
Use Manager to add or remove components.
|
inlinenoexcept |
Searches for the specified component type.
| type | target component type hash code |