![]() |
ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
|
Type-erased interface for SparseSet<T>. More...
#include <Imago/ECS/SparseSetBase.hpp>

Public Member Functions | |
| virtual void | remove (Entity e)=0 |
| removes an Entity's component from this pool, if it is currently present | |
| virtual bool | has (Entity e) const =0 |
| checks whether an Entity currently has a component stored in this pool | |
| virtual size_t | get_size () const =0 |
| return the number of Entities currently stored in this pool | |
| virtual const std::vector< Entity > & | get_entities () const =0 |
| returns the dense array of entities currently stored in this pool | |
| virtual size_t | get_index (Entity e) const =0 |
| Returns the index of the specified Entity. | |
| virtual void | swap_entities (Entity e1, Entity e2)=0 |
| Swaps e1 with e2 in _dense, _entities, and _sparse. | |
Type-erased interface for SparseSet<T>.
Lets Nexus store pools of different component types behind a single pointer type without knowing what T any given pool actually holds. SparseSet<T> is the only intended implementation of this interface.
|
pure virtual |
returns the dense array of entities currently stored in this pool
Implemented in Imago::ECS::SparseSet< T >.
|
pure virtual |
Returns the index of the specified Entity.
| e | The entity's whose index to return. |
Implemented in Imago::ECS::SparseSet< T >.
|
pure virtual |
return the number of Entities currently stored in this pool
Implemented in Imago::ECS::SparseSet< T >.
|
pure virtual |
checks whether an Entity currently has a component stored in this pool
| e | the Entity to check |
Implemented in Imago::ECS::SparseSet< T >.
|
pure virtual |
removes an Entity's component from this pool, if it is currently present
| e | the Entity to remove |
Implemented in Imago::ECS::SparseSet< T >.
Swaps e1 with e2 in _dense, _entities, and _sparse.
Implemented in Imago::ECS::SparseSet< T >.