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 { ... }

Base class

classSystem

Abstract base class for game systems. More...

Public Member Functions Index

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

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 37 of file ComposeTransformSystem.ixx.

Public Member Functions

update()

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

Updates TransformComponents based on state components.

Parameters
updateContext

Context containing frame timing and game state.

Definition at line 46 of file ComposeTransformSystem.ixx.

46 void update(helios::engine::runtime::world::UpdateContext& updateContext) noexcept override {
47
48 const float deltaTime = updateContext.deltaTime();
49
50 for (auto [entity, tc, tsc, active] : gameWorld_->view<
54 >().whereEnabled()) {
55 tc->setLocalTranslation(tsc->translation());
56 }
57
58 for (auto [entity, tc, rsc, active] : gameWorld_->view<
62 >().whereEnabled()) {
63
64 tc->setLocalRotation(rsc->rotation());
65 }
66 }

Reference helios::engine::ecs::System::gameWorld_.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.