80 assert(index <=
ENTITY_INDEX_MASK &&
"[ENTITY] Entity index exceeds 20-bit range");
uint32_t Entity
A packed identifier: 20 bits of index, 12 bits of generation.
Definition Entity.hpp:20
constexpr Entity make_entity(uint32_t index, uint32_t generation)
Packs an index and generation into a single Entity.
Definition Entity.hpp:77
constexpr uint32_t ENTITY_INDEX_MASK
Mask isolating the low 20 index bits of a packed Entity.
Definition Entity.hpp:31
constexpr uint32_t ENTITY_INDEX_BITS
Number of bits allocated to an Entity's index.
Definition Entity.hpp:26
constexpr Entity NULL_ENTITY
Sentinel value representing "no entity".
Definition Entity.hpp:41
constexpr uint32_t ENTITY_GENERATION_MASK
Mask isolating the low 12 bits of a right shifted generation value.
Definition Entity.hpp:33
constexpr uint32_t ENTITY_GENERATION_BITS
Number of bits allocated to an Entity's generation.
Definition Entity.hpp:28
constexpr uint32_t get_entity_generation(Entity entity)
Extracts the generation bits from a packed Entity.
Definition Entity.hpp:63
constexpr uint32_t get_entity_index(Entity entity)
Extracts the index bits from a packed Entity.
Definition Entity.hpp:52