Skip to content

Engine → Scene

transform_system.h

Transform propagation: the body of scene.propagate_transforms. One job dispatch per hierarchy level (roots first), so the parent of every entity in a level has been finished by the previous level's join. A chunk is recomputed as a whole when its local_transform column changed since the previous run, when it carries transform_dirty or when it holds interpolated poses; otherwise only its rows marked transform_state::pending are recomputed, the mark a parent's pass left when it recomputed its own world matrix (the transform_state::lastUpdateRun stamp), sits in an interpolated subtree or changed flags. Clean rows are never looked up: a level scans the state column of its chunks, collects the chunks with work and splits them into jobs by dirty rows. world_transform and render_world_transform are written in the same visit; dirty tags are removed through the system's command buffer after the level join. Allocation-free once the queries have seen every archetype and the level scratch has seen its largest level.

Structs

File Description
propagation_stats Counters of the last run.
transform_system::chunk_tally One job range's counts, kept on its own stack so the shared counters' cache line is written once per range instead of four times per chunk.
transform_system::level_chunk One chunk of the level being processed that has rows to recompute.
transform_system::run_counters Relaxed counters each job range adds its local tally to once (chunksSkipped comes from the serial collect step); copied into mStats after the run.

Classes

File Description
transform_system

Functions

Public

compute_world_transform

[[nodiscard]] CONJURE_API math::transform compute_world_transform(
    const scene &target,
    ecs::entity entity);

Exact world transform of an entity from a fresh ancestor walk. An entity or ancestor without local_transform contributes the identity and the walk continues upwards, so a transformless entity yields its nearest transformed ancestor's world (the identity when there is none).