|
|
| Archetype (Archetype &&)=delete |
| |
|
| Archetype (const Archetype &)=delete |
| |
|
Archetype & | operator= (Archetype &&)=delete |
| |
|
Archetype & | operator= (const Archetype &)=delete |
| |
|
void | save (ser::ISerializer &s) |
| |
|
void | load (ser::ISerializer &s) |
| |
|
void | list_idx (uint32_t idx) |
| |
|
uint32_t | list_idx () const |
| |
|
GAIA_NODISCARD bool | cmp_comps (const ArchetypeLookupChecker &other) const |
| |
|
QueryMask | queryMask () const |
| |
|
ArchetypeIdLookupKey::LookupHash | id_hash () const |
| |
| void | set_hashes (LookupHash hashLookup) |
| | Sets hashes for each component type and lookup.
|
| |
| void | enable_entity (Chunk *pChunk, uint16_t row, bool enableEntity, EntityContainers &recs) |
| | Enables or disables the entity on a given row in the chunk.
|
| |
| void | del (Chunk *pChunk) |
| | Removes a chunk from the list of chunks managed by their archetype and deletes its memory.
|
| |
| GAIA_NODISCARD Chunk * | foc_free_chunk () |
| | Tries to locate a chunk that has some space left for a new entity. If not found a new chunk is created.
|
| |
| void | try_update_free_chunk_idx () |
| | Tries to update the index of the first chunk that has space left for at least one entity.
|
| |
| void | try_update_free_chunk_idx (Chunk &chunkThatRemovedEntity) |
| | Tries to update the index of the first chunk that has space left for at least one entity.
|
| |
| void | remove_entity_raw (Chunk &chunk, uint16_t row, EntityContainers &recs) |
| | Removes an entity from the chunk.
|
| |
| void | remove_entity (Chunk &chunk, uint16_t row, EntityContainers &recs) |
| | Removes an entity from the chunk and updates the chunk versions.
|
| |
|
GAIA_NODISCARD const Properties & | props () const |
| |
|
GAIA_NODISCARD const cnt::darray< Chunk * > & | chunks () const |
| |
|
GAIA_NODISCARD LookupHash | lookup_hash () const |
| |
|
GAIA_NODISCARD EntitySpan | ids_view () const |
| |
|
GAIA_NODISCARD ComponentSpan | comps_view () const |
| |
|
GAIA_NODISCARD ChunkDataOffsetSpan | comp_offs_view () const |
| |
| GAIA_NODISCARD uint32_t | pairs () const |
| | Returns the number of pairs registered in the archetype.
|
| |
| GAIA_NODISCARD uint32_t | pairs_is () const |
| | Returns the number of Is pairs registered in the archetype.
|
| |
|
GAIA_NODISCARD Entity | entity_from_pairs_as_idx (uint32_t idx) const |
| |
| GAIA_NODISCARD bool | has (Entity entity) const |
| | Checks if an entity is a part of the archetype.
|
| |
| template<typename T > |
| GAIA_NODISCARD bool | has () const |
| | Checks if component.
|
| |
|
template<bool Enabled> |
| Entity | getValue (size_t flatIndex) const |
| | Given a flat index, return a reference to the value.
|
| |
|
template<bool Enabled> |
| const void * | getValue (uint32_t compIdx, size_t flatIndex, Entity &outEntity) const |
| | Given a flat index, return a reference to the value.
|
| |
|
template<bool Enabled> |
| void | sort_entities_inter (size_t low, size_t high, TSortByFunc func) |
| | Generic in-place quicksort across chunks.
|
| |
|
template<bool Enabled> |
| void | sort_entities_inter (const ComponentCacheItem *pItem, uint32_t compIdx, size_t low, size_t high, TSortByFunc func) |
| | Generic in-place quicksort across chunks.
|
| |
| void | sort_entities (Entity entity, TSortByFunc func) |
| | Sorts all entities in the archetypes according to the given function.
|
| |
| void | build_graph_edges (Archetype *pArchetypeRight, Entity entity) |
| | Builds a graph edge from this archetype to the right archetype.
|
| |
|
void | build_graph_edges_left (Archetype *pArchetypeLeft, Entity entity) |
| |
|
void | del_graph_edges (Archetype *pArchetypeRight, Entity entity) |
| |
|
void | del_graph_edges_left (Archetype *pArchetypeLeft, Entity entity) |
| |
| GAIA_NODISCARD ArchetypeGraphEdge | find_edge_right (Entity entity) const |
| | Checks if an archetype graph "add" edge with entity.
|
| |
| GAIA_NODISCARD ArchetypeGraphEdge | find_edge_left (Entity entity) const |
| | Checks if an archetype graph "del" edge with entity.
|
| |
|
GAIA_NODISCARD auto & | right_edges () |
| |
|
GAIA_NODISCARD const auto & | right_edges () const |
| |
|
GAIA_NODISCARD auto & | left_edges () |
| |
|
GAIA_NODISCARD const auto & | left_edges () const |
| |
|
GAIA_NODISCARD bool | empty () const |
| | Checks is there are no chunk in the archetype.
|
| |
|
void | req_del () |
| | Request deleting the archetype.
|
| |
|
GAIA_NODISCARD bool | is_req_del () const |
| | Returns true if this archetype is requested to be deleted.
|
| |
| void | set_max_lifespan (uint32_t lifespan) |
| | Sets maximal lifespan of an archetype.
|
| |
|
GAIA_NODISCARD uint32_t | max_lifespan () const |
| | Returns the maximal lifespan of the archetype. If zero, the archetype it kept indefinitely.
|
| |
|
GAIA_NODISCARD bool | dying () const |
| | Checks is this chunk is dying.
|
| |
|
void | die () |
| | Marks the chunk as dead.
|
| |
|
GAIA_NODISCARD bool | dead () const |
| | Checks is this chunk is dying.
|
| |
|
void | start_dying () |
| | Starts the process of dying.
|
| |
|
void | revive () |
| | Makes the archetype alive again.
|
| |
| GAIA_NODISCARD bool | progress_death () |
| | Updates internal lifespan.
|
| |
|
GAIA_NODISCARD bool | ready_to_die () const |
| | Tells whether archetype is ready to be deleted.
|
| |
|
GAIA_NODISCARD ArchetypeId | id () const |
| |