Skip to main content

scene Folder

Folders Index

foldercomponents
foldersystems
foldertypes

Files Index

filehelios/engine/modules/scene/_module.ixx

Aggregate module for helios::engine::modules::scene namespace. More...

filemodules/scene/registry.ixx

Component registration for scene module. More...

Description

helios::engine::modules::scene

Scene graph integration for game entities.

This module provides components and systems that bridge the game logic layer (GameObjects) with the rendering layer (SceneNodes).

Submodules

SubmodulePurpose
components/Scene node reference components
systems/Transform synchronization with scene graph

Key Classes

ClassPurpose
SceneNodeComponentHolds reference to the entity's SceneNode
SceneSyncSystemSyncs composed transforms to SceneNodes each frame

Architecture

The scene module bridges two layers:

  • Game Layer: GameObjects with ComposeTransformComponent
  • Render Layer: SceneNodes with world transforms

SceneSyncSystem copies the composed transform matrix from each GameObject to its associated SceneNode, keeping the visual representation in sync with game state.

Usage

 // Create scene node for entity
 auto sceneNode = scene.rootNode().createChild();
 
 // Create entity with scene integration
 auto player = GameObjectFactory::gameObject()
  .withRendering([&](auto& r) {
  r.renderable()
  .shape(triangleShape)
  .shader(shader)
  .attachTo(sceneNode); // Links to SceneNode
  })
  .make(true);
 
 // SceneNodeComponent is added automatically by RenderingBuilder
 // Manual access if needed:
 auto* snc = player->get<SceneNodeComponent>();
 helios::scene::SceneNode* node = snc->sceneNode();
 
 // Register sync system in Post phase
 gameLoop.phase(PhaseType::Post).addPass()
  .addSystem<SceneSyncSystem>(&gameWorld, &scene);


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.