Skip to main content

WorldTransformSystem.ixx File

System that propagates local position changes to world transforms. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine
namespacescene
namespacesystems

Classes Index

classWorldTransformSystem<TMemberHandle>

Updates world-space transforms from local position components. More...

Description

System that propagates local position changes to world transforms.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7export module helios.engine.spatial.systems.WorldTransformSystem;
8
9import helios.engine.runtime.world.tags.SystemRole;
10
11import helios.engine.runtime.world.UpdateContext;
12
13import helios.ecs.components;
14import helios.engine.spatial.components;
15
16
17import helios.math;
18import helios.engine.core.types.ComponentTypeTags;
19
20using namespace helios::engine::core::types;
21using namespace helios::ecs::components;
25export namespace helios::engine::scene::systems {
26
32 template<typename TMemberHandle>
34
35 public:
36
41
51
52
53 for (auto [
54 entity,
58 active] : updateContext.view<
64 >().whereEnabled()) {
65
66 if (localPosition->isDirty() || localRotation->isDirty()) {
67 worldTransform->setValue(
68 localRotation->value().rotationMatrix().withTranslation(localPosition->value())
69 );
70 }
71
72 }
73
74 }
75
76
77 };
78}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.