|
SDEngine
Game Engine
|
#include <EntityManager.hpp>
Inheritance diagram for sd::EntityManager:
Collaboration diagram for sd::EntityManager:Classes | |
| struct | UnpackGroup |
| struct | UnpackGroup< ComponentGroup< Ts... > > |
| struct | UnpackGroup< std::tuple< Ts... > > |
Private Types | |
| using | ComponentMask = std::bitset< 256 > |
Private Member Functions | |
| u32 | pop_free_list () |
| void | ValidateInvariants () const |
Private Attributes | |
| std::vector< u32 > | m_generations |
| std::vector< u32 > | m_free_list |
| std::vector< std::unique_ptr< SparseEntitySetBase > > | m_component_pools |
| SparseEntitySet< ComponentMask > | m_entity_masks |
Friends | |
| class | RuntimeStateManager |
EntityManager is the central ECS manager, that manages entities, components and allows for queries into the system using views. If you intend to use the entitymanager with a custom component, it will require you to register the component using the REGISTER_COMPONENT macro.
Many systems and subsystems query the ECS for entities and their components, the views can be created per component, for multiple components, or of a ComponentGroup of components.
|
private |
| T * sd::EntityManager::add_component | ( | Entity | e, |
| Args &&... | args | ||
| ) |
| T * sd::EntityManager::add_component | ( | Entity | e, |
| Args &&... | args | ||
| ) |
|
inline |
|
inlineoverridevirtual |
Implements sd::Serializable.
|
inline |
|
inline |
See TryGetComponent for safe pointer version.
| T |
| e |
| std::tuple< Components &... > sd::EntityManager::get_component_group | ( | Entity | e | ) |
| std::tuple< Components &... > sd::EntityManager::get_component_group | ( | Entity | e | ) |
| std::tuple< const Components &... > sd::EntityManager::get_component_group | ( | Entity | e | ) | const |
| std::tuple< const Components &... > sd::EntityManager::get_component_group | ( | Entity | e | ) | const |
| SparseEntitySet< T > * sd::EntityManager::get_component_pool | ( | ) |
| SparseEntitySet< T > * sd::EntityManager::get_component_pool | ( | ) |
|
inline |
|
inlineprivate |
|
inlineoverridevirtual |
Implements sd::Serializable.
|
inlineprivate |
| auto sd::EntityManager::view | ( | ) |
| auto sd::EntityManager::view | ( | ) |
|
friend |
|
private |
|
private |
|
private |
|
private |