Skip to main content

transform Folder

Folders Index

foldercomponents
foldersystems

Files Index

filehelios/engine/modules/spatial/transform/_module.ixx

Aggregate module for helios::engine::modules::spatial::transform namespace. More...

filemodules/spatial/transform/registry.ixx

Component registration for spatial transform module. More...

Description

helios::engine::modules::spatial::transform

Transform components and systems for spatial state management.

This module provides components that store individual transform properties and systems that compose them into final world transforms.

Submodules

SubmodulePurpose
components/Per-frame transform deltas and composed transform
systems/Transform composition and cleanup systems

Key Classes

ClassPurpose
TranslationStateComponentTranslation delta for the current frame
RotationStateComponentRotation delta for the current frame
ScaleStateComponentScale delta for the current frame
ComposeTransformComponentFinal composed transform matrix
ComposeTransformSystemBuilds final transform from component deltas
ScaleSystemApplies scale state to composed transform
TransformClearSystemClears dirty flags after scene sync

Transform Workflow

Each frame, transform state flows through the pipeline:

1. Input Systems write deltas to state components 2. ComposeTransformSystem combines deltas into final matrix 3. SceneSyncSystem copies matrix to SceneNode 4. TransformClearSystem resets dirty flags

Usage

 // Create entity with transform components (via builder)
 auto entity = GameObjectFactory::gameObject()
  .withTransform([](auto& t) {
  t.transform()
  .translate({0.0f, 0.0f, 0.0f})
  .scale({1.0f, 1.0f, 1.0f});
  })
  .make(true);
 
 // Direct component access for per-frame updates
 auto* translation = entity.get<TranslationStateComponent>();
 translation->add({1.0f, 0.0f, 0.0f}); // Move right
 
 auto* rotation = entity.get<RotationStateComponent>();
 
 // Register systems in correct order
 gameLoop.phase(PhaseType::Main).addPass()
  .addSystem<ComposeTransformSystem>(&gameWorld)
  .addSystem<ScaleSystem>(&gameWorld);
 
 gameLoop.phase(PhaseType::Post).addPass()
  .addSystem<SceneSyncSystem>(&gameWorld, &scene)
  .addSystem<TransformClearSystem>(&gameWorld);


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.