FECS
|
Defines core types and constants for the FECS ECS system. More...
#include <cstdint>
#include <limits>
Go to the source code of this file.
Classes | |
struct | FECS::GlobalComponent |
Dummy tag component used for tracking global ECS changes (e.g. full view rebuilds). More... | |
Macros | |
#define | FECS_SPARSE_PAGE_SIZE 2048 |
Defines the default number of elements per sparse page, if not specified. | |
Typedefs | |
using | FECS::Entity = std::uint32_t |
Type alias for entity IDs (32-bit unsigned integer) | |
using | FECS::ComponentIndex = std::uint32_t |
Type alias for identifying component type indices. | |
Functions | |
Entity | FECS::BuildEntityIndex (std::uint32_t index, std::uint32_t version) |
Combines an entity index and version into a single 32-bit entity ID. | |
std::uint32_t | FECS::GetEntityIndex (Entity e) |
Extracts the index portion from an entity ID. | |
std::uint32_t | FECS::GetEntityVersion (Entity e) |
Extracts the verison portion from an entity ID. | |
Defines core types and constants for the FECS ECS system.
Includes definitions for entities, component indexing, sparse page sizing, and utility functions for encoding and decoding entity IDs.
|
inline |
Combines an entity index and version into a single 32-bit entity ID.
The lower 20 bits are used for the index, and the upper 12 for the version.
index | The entity index. |
version | The entity verison. |
|
inline |
Extracts the index portion from an entity ID.
e | The encoded entity ID. |
|
inline |
Extracts the verison portion from an entity ID.
e | The encoded entity ID. |