Skip to content

Engine → ECS

world.h

The world.

Structs

File Description
component_init An initial value of one component for world::create_entities: data holds the value of the first entity and every next entity's value starts stride bytes further; stride 0 gives every entity the one value at data. A null data keeps the registered default value, and a tag ignores data and stride.
world::entity_record Where an entity lives. The generation is the current occupant's (ALIVE) or the next one to be issued for the index (FREE), which is how flush recognises reserved ids.
world::flush_entry One entry of the flush plan: everything a command buffer says about one entity, folded into a single archetype move. The plan vector is kept across flushes.
world::flush_slot One entry of the flush-stamped slot table: the plan index of an entity, valid only while stamp equals the current flush's stamp, so the table is never cleared between flushes.
world_desc Creation parameters of a world.
world_stats Snapshot of a world's size.

Classes

File Description
iteration_scope RAII token that marks a world locked for iteration: structural calls are refused while any scope is alive. Movable; the moved-from scope releases nothing. Scopes may be taken from any thread (an atomic depth counter).
world

Enumerations

world::entity_state

enum class entity_state : u8 {
    FREE,
    ALIVE
};

Forward Declarations

chunk

class chunk;

chunk_pool

class chunk_pool;

entity_allocator

class entity_allocator;

entity_archive

class entity_archive;

entity_handle

class entity_handle;

observer_table

class observer_table;