|
|
| CommandBuffer (World &world) |
| |
|
| CommandBuffer (CommandBuffer &&)=delete |
| |
|
| CommandBuffer (const CommandBuffer &)=delete |
| |
|
CommandBuffer & | operator= (CommandBuffer &&)=delete |
| |
|
CommandBuffer & | operator= (const CommandBuffer &)=delete |
| |
| GAIA_NODISCARD Entity | add (EntityKind kind=EntityKind::EK_Gen) |
| | Requests a new entity to be created.
|
| |
| GAIA_NODISCARD Entity | copy (Entity entityFrom) |
| | Requests a new entity to be created by cloning an already existing entity.
|
| |
| template<typename T > |
| void | add (Entity entity) |
| | Requests a component T to be added to entity.
|
| |
| void | add (Entity entity, Entity other) |
| | Requests an entity other to be added to entity entity.
|
| |
| template<typename T > |
| void | add (Entity entity, T &&value) |
| | Requests a component T to be added to entity. Also sets its value.
|
| |
| template<typename T > |
| void | set (Entity entity, T &&value) |
| | Requests component data to be set to given values for a given entity.
|
| |
| void | del (Entity entity) |
| | Requests an existing entity to be removed.
|
| |
| template<typename T > |
| void | del (Entity entity) |
| | Requests removal of component T from entity.
|
| |
| void | del (Entity entity, Entity object) |
| | Requests removal of entity object from entity entity.
|
| |
|
void | commit () |
| | Commits all queued changes.
|
| |
template<typename AccessContext>
class gaia::ecs::detail::CommandBuffer< AccessContext >
Buffer for deferred execution of some operations on entities.
Adding and removing components and entities inside World::each or can result in changes of archetypes or chunk structure. This would lead to an undefined behavior. Therefore, such operations have to be executed after the loop is done.