Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::SceneGraph Class Reference

Represents the entire scene as a graph (specifically, a tree) of SceneNode objects. It manages the hierarchy of nodes and provides access to the root of the scene. More...

#include <SceneGraph.h>

Collaboration diagram for EngineCore::SceneGraph:

Public Member Functions

 SceneGraph (const std::shared_ptr< SceneNode > &root)
 Constructs a new Scene Graph object, initializing the root node.
const std::shared_ptr< SceneNode > & getRoot () const
 Gets the root node of the scene graph.
std::shared_ptr< SceneNodecreateNode (const Ecs::LocalTransform &transform, std::shared_ptr< SceneNode > parent, bool disableCaching=false)
 Creates a node which tells you where an object is in the scene.

Private Attributes

std::shared_ptr< SceneNoderoot

Detailed Description

Represents the entire scene as a graph (specifically, a tree) of SceneNode objects. It manages the hierarchy of nodes and provides access to the root of the scene.

Date
2025-07-23
Author
Konstantin Passig

Definition at line 266 of file SceneGraph.h.

Constructor & Destructor Documentation

◆ SceneGraph()

EngineCore::SceneGraph::SceneGraph ( const std::shared_ptr< SceneNode > & root)
explicit

Constructs a new Scene Graph object, initializing the root node.

Date
2025-07-23
Author
Konstantin Passig

Definition at line 241 of file SceneGraph.cpp.

References root.

Member Function Documentation

◆ createNode()

std::shared_ptr< SceneNode > EngineCore::SceneGraph::createNode ( const Ecs::LocalTransform & transform,
std::shared_ptr< SceneNode > parent,
bool disableCaching = false )

Creates a node which tells you where an object is in the scene.

Parameters
transformworld transform where the node should be
parentthe parent node
disableCachingif the node is updated each frame (eg controller or player) caching of the position can be disabled. This enables skipping the update when it is not dirty
Returns
The created SceneNode
Author
Konstantin Passig
Date
06.12.2025

Definition at line 245 of file SceneGraph.cpp.

References EngineCore::NodeFactory::createNode(), and Ecs::LocalTransform::matrix.

Here is the call graph for this function:

◆ getRoot()

const std::shared_ptr< SceneNode > & EngineCore::SceneGraph::getRoot ( ) const
inline

Gets the root node of the scene graph.

Returns
A const reference to the unique_ptr holding the root SceneNode.
Date
2025-07-23
Author
Konstantin Passig

Definition at line 285 of file SceneGraph.h.

References root.

Member Data Documentation

◆ root

std::shared_ptr<SceneNode> EngineCore::SceneGraph::root
private

Definition at line 268 of file SceneGraph.h.

Referenced by getRoot(), and SceneGraph().


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/World/SceneGraph.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/World/SceneGraph.cpp