Skip to main content

ComposeTransformSystem Class

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

Declaration

class helios::engine::modules::spatial::transform::systems::ComposeTransformSystem { ... }

Public Member Typedefs Index

usingEngineRoleTag = helios::engine::common::tags::SystemRole

Public Member Functions Index

voidupdate (helios::engine::runtime::world::UpdateContext &updateContext) noexcept

Updates TransformComponents based on state components. More...

Description

System that composes the final ComposeTransformComponent from state components.

This system takes the raw state from TranslationStateComponent and RotationStateComponent and applies it to the ComposeTransformComponent. It combines heading and spin rotations into a single rotation matrix and updates the local translation.

Definition at line 39 of file ComposeTransformSystem.ixx.

Public Member Typedefs

EngineRoleTag

using helios::engine::modules::spatial::transform::systems::ComposeTransformSystem::EngineRoleTag = helios::engine::common::tags::SystemRole

Public Member Functions

update()

void helios::engine::modules::spatial::transform::systems::ComposeTransformSystem::update (helios::engine::runtime::world::UpdateContext & updateContext)
inline noexcept

Updates TransformComponents based on state components.

Parameters
updateContext

Context containing frame timing and game state.

Definition at line 50 of file ComposeTransformSystem.ixx.

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 }

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.