Skip to main content

TransformClearSystem.ixx File

System for resetting dirty flags on TransformComponents. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespacemodules

Domain-specific components and systems. More...

namespacespatial
namespacetransform

Transform components and systems for spatial state management. More...

namespacesystems

Transform composition systems. More...

Classes Index

classTransformClearSystem

System that clears the dirty state of TransformComponents and ScaleComponents at the end of a frame. More...

Description

System for resetting dirty flags on TransformComponents.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file TransformClearSystem.ixx
3 * @brief System for resetting dirty flags on TransformComponents.
4 */
5module;
6
7
8
9export module helios.engine.modules.spatial.transform.systems.TransformClearSystem;
10
11import helios.engine.runtime.world.GameWorld;
12import helios.engine.ecs.System;
13import helios.engine.runtime.world.UpdateContext;
14
15import helios.engine.modules.scene.components.SceneNodeComponent;
16import helios.engine.modules.spatial.transform.components.ComposeTransformComponent;
17
18import helios.engine.modules.spatial.transform.components.ScaleStateComponent;
19
20import helios.engine.mechanics.lifecycle.components.Active;
21
23
24 /**
25 * @brief System that clears the dirty state of TransformComponents and ScaleComponents
26 * at the end of a frame.
27 *
28 * @details This system runs in the post-update phase. It iterates over all
29 * TransformComponents and resets their dirty flag if it was set. This ensures that
30 * changes are only processed once per frame by other systems (like SceneSyncSystem).
31 */
33
34
35 public:
36
37 /**
38 * @brief Updates the system, clearing dirty flags of Transform- and ScaleStateComponent.
39 *
40 * @param updateContext The update context.
41 */
42 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept override {
43
44 for (auto [entity, tc, active] : gameWorld_->view<
47 >().whereEnabled()) {
48 tc->clearDirty();
49 }
50
51 for (auto [entity, sc, active] : gameWorld_->view<
54 >().whereEnabled()) {
55 sc->clearDirty();
56 }
57
58 }
59
60 };
61
62}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.