Skip to main content

ComposeTransformSystem.ixx File

System for composing final transforms from separate state components. 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

classComposeTransformSystem

System that composes the final ComposeTransformComponent from state components. More...

Description

System for composing final transforms from separate state components.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file ComposeTransformSystem.ixx
3 * @brief System for composing final transforms from separate state components.
4 */
5module;
6
7
8
9export module helios.engine.modules.spatial.transform.systems.ComposeTransformSystem;
10
11
12
13import helios.engine.modules.spatial.transform.components.TranslationStateComponent;
14import helios.engine.modules.spatial.transform.components.RotationStateComponent;
15import helios.engine.modules.spatial.transform.components.ComposeTransformComponent;
16import helios.engine.modules.effects.gfx.components.SpinComponent;
17
18import helios.engine.runtime.world.GameWorld;
19
20import helios.engine.runtime.world.UpdateContext;
21
22import helios.engine.mechanics.lifecycle.components.Active;
23
24import helios.math;
25
26import helios.engine.common.tags.SystemRole;
27
29
30 /**
31 * @brief System that composes the final ComposeTransformComponent from state components.
32 *
33 * @details
34 * This system takes the raw state from TranslationStateComponent and
35 * RotationStateComponent and applies it to the ComposeTransformComponent.
36 * It combines heading and spin rotations into a single rotation matrix
37 * and updates the local translation.
38 */
40
41 public:
42
44
45 /**
46 * @brief Updates TransformComponents based on state components.
47 *
48 * @param updateContext Context containing frame timing and game state.
49 */
51
52 const float deltaTime = updateContext.deltaTime();
53
54 for (auto [entity, tc, tsc, active] : updateContext.view<
58 >().whereEnabled()) {
59 tc->setLocalTranslation(tsc->translation());
60 }
61
62 for (auto [entity, tc, rsc, active] : updateContext.view<
66 >().whereEnabled()) {
67
68 tc->setLocalRotation(rsc->rotation());
69 }
70 }
71
72
73
74 };
75
76};

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.