|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <TransformSystem.hpp>

Public Member Functions | |
| TransformSystem () | |
| void | init (Registry ®istry) override |
| Called once when the system is added to a group. | |
| void | update (World &world) override |
| Called every frame to execute system logic. | |
| void | ensureComposed (Registry ®istry) |
| Compose if anything changed since the last one; O(1) if not. | |
| u32 | composedEpoch () const |
| u32 | compositionSerial () const |
| How many compositions have RUN. | |
| void | setChangeTracking (bool on) |
| Collect which entities' composed OUTPUT changed, from now on. | |
| bool | changeTracking () const |
| const std::vector< Entity > & | pendingChanges () const |
| What every composition since the last acknowledgement changed. | |
| bool | changesOverflowed () const |
| Whether the pending set was dropped for being bigger than a rebuild. | |
| void | takeChanges () |
| Acknowledge the pending set: it is applied, and starts again. | |
| u32 | visited () const |
| How many entities the last composition wrote, changed or not. | |
| Public Member Functions inherited from esengine::ecs::System | |
| virtual | ~System ()=default |
| Virtual destructor for proper cleanup. | |
| virtual void | shutdown (Registry ®istry) |
| Called once when the system is removed. | |
| void | setEnabled (bool enabled) |
| Enables or disables the system. | |
| bool | isEnabled () const |
| Checks if the system is enabled. | |
| void | setPriority (i32 priority) |
| Sets the system's execution priority. | |
| i32 | getPriority () const |
| Gets the system's execution priority. | |
Additional Inherited Members | |
| Protected Attributes inherited from esengine::ecs::System | |
| bool | enabled_ = true |
| Whether the system is enabled. | |
| i32 | priority_ = 0 |
| Execution priority (lower = earlier). | |
Definition at line 29 of file TransformSystem.hpp.
|
inline |
Definition at line 31 of file TransformSystem.hpp.
References esengine::ecs::System::setPriority().
|
inline |
Whether the pending set was dropped for being bigger than a rebuild.
Once more entities have changed than there are Transforms, reading them all again is cheaper than replaying the list — so it is dropped and the consumer is told to rebuild instead of handed a set that costs more than the thing it saves.
Definition at line 89 of file TransformSystem.hpp.
|
inline |
Definition at line 72 of file TransformSystem.hpp.
|
inline |
Definition at line 54 of file TransformSystem.hpp.
|
inline |
How many compositions have RUN.
A consumer compares it with the serial at its last acknowledgement to answer "has anything composed since?" without looking at a set.
Definition at line 61 of file TransformSystem.hpp.
|
inline |
Compose if anything changed since the last one; O(1) if not.
Consumers call this rather than update(), so a renderer and a replication sample in one generation pay for one composition.
Definition at line 48 of file TransformSystem.hpp.
References esengine::ecs::Registry::instanceId(), and esengine::ecs::transformMutationEpoch().
Referenced by esengine::springbone::SpringBoneSystem::update().
|
inlineoverridevirtual |
Called once when the system is added to a group.
| registry | Reference to the ECS registry |
Override to perform one-time initialization such as caching component pools or loading resources.
Reimplemented from esengine::ecs::System.
Definition at line 35 of file TransformSystem.hpp.
|
inline |
What every composition since the last acknowledgement changed.
ACCUMULATED, not per-composition: a renderer composes each frame and a consumer samples every few. Duplicates are kept, because applying an entity twice is idempotent for every consumer.
Definition at line 80 of file TransformSystem.hpp.
|
inline |
Collect which entities' composed OUTPUT changed, from now on.
Definition at line 68 of file TransformSystem.hpp.
References takeChanges().
|
inline |
Acknowledge the pending set: it is applied, and starts again.
Definition at line 92 of file TransformSystem.hpp.
Referenced by setChangeTracking().
|
inlineoverridevirtual |
Called every frame to execute system logic.
| world | The world context (registry, services, deltaTime) |
Pure virtual - must be overridden. This is where the main system logic goes.
Implements esengine::ecs::System.
Definition at line 39 of file TransformSystem.hpp.
Referenced by esengine::transform_update().
|
inline |
How many entities the last composition wrote, changed or not.
Definition at line 95 of file TransformSystem.hpp.