Archetype class

Public types

struct ArchetypeKey
struct EntitySlot
struct FieldDescriptor
struct FieldKey

Constructors, destructors, conversion operators

Archetype(const Signature& sig, const ClassID& id, const char* debugName = "Archetype")
Archetype(const ArchetypeKey& archKey, const char* debugName = "Archetype")
~Archetype()

Public functions

auto GetAllocatedChunkCount(size_t chunkIndex) const -> uint32_t
auto GetLiveChunkCount(size_t chunkIndex) const -> uint32_t
auto GetFieldArrays(Chunk* targetChunk, ComponentTypeID typeId) -> std::vector<void*>
auto GetFieldArray(Chunk* chunk, ComponentTypeID typeID, uint32_t fieldIndex) -> void*
void BuildFieldDualArrayTable(Chunk* chunk, void** outDualArrayTable, uint32_t absoluteFrame, uint32_t volatileAbsoluteFrame) const
void BuildFieldArrayTable(Chunk* chunk, void** outFieldArrayTable, uint32_t absoluteFrame, uint32_t volatileAbsoluteFrame) const
auto GetFieldArrayCount() const -> size_t
auto GetComponentFieldSlotIndices(ComponentTypeID typeID, uint8_t* outSlots, uint32_t maxSlots) const -> uint32_t

Public variables

Signature ArchSignature
ClassID ArchClassID
const char* DebugName
uint32_t EntitiesPerChunk
uint32_t AllocatedEntityCount
uint32_t TotalEntityCount
std::vector<Chunk*> Chunks
std::vector<EntitySlot> ActiveEntitySlots
std::vector<EntitySlot> InactiveEntitySlots
std::vector<uint32_t> ChunkLiveCounts
std::unordered_map<ComponentTypeID, Archetype*> AddEdges
std::unordered_map<ComponentTypeID, Archetype*> RemoveEdges
FlatMap<FieldKey, FieldDescriptor> ArchetypeFieldLayout
size_t TotalChunkDataSize