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

Factory class for creating SceneNodes with proper parent-child relationships. This ensures that nodes are always created with a valid parent. More...

#include <SceneGraph.h>

Static Public Member Functions

static std::shared_ptr< SceneNodecreateNode (const std::shared_ptr< SceneNode > &parent, const bool disableCaching=false)
 Creates a new SceneNode with the specified parent.
static std::vector< std::shared_ptr< SceneNode > > createNodes (const std::shared_ptr< SceneNode > &parent, size_t count, bool disableCaching=false)
 Creates multiple nodes under the same parent.
static std::shared_ptr< RootNodecreateRoot (bool disableCaching=false)
 Creates a new root node for a scene graph. This is the only way to create a parentless node, and should only be used by SceneGraph.

Detailed Description

Factory class for creating SceneNodes with proper parent-child relationships. This ensures that nodes are always created with a valid parent.

Date
2025-07-23
Author
Konstantin Passig

Definition at line 310 of file SceneGraph.h.

Member Function Documentation

◆ createNode()

std::shared_ptr< SceneNode > EngineCore::NodeFactory::createNode ( const std::shared_ptr< SceneNode > & parent,
const bool disableCaching = false )
static

Creates a new SceneNode with the specified parent.

Parameters
parentThe parent node that will own this new node.
disableCachingIf true, the world matrix will be recalculated every time it is requested.
Returns
std::shared_ptr<SceneNode> The newly created node, already added to the parent.

Definition at line 252 of file SceneGraph.cpp.

References Ecs::RegistryManager::get().

Referenced by EngineCore::SceneGraph::createNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createNodes()

std::vector< std::shared_ptr< SceneNode > > EngineCore::NodeFactory::createNodes ( const std::shared_ptr< SceneNode > & parent,
size_t count,
bool disableCaching = false )
static

Creates multiple nodes under the same parent.

Parameters
parentThe parent node that will own these new nodes.
countNumber of nodes to create.
disableCachingIf true, the world matrices will be recalculated every time they are requested.
Returns
std::vector<std::shared_ptr<SceneNode>> Vector of newly created nodes, already added to the parent.

Definition at line 264 of file SceneGraph.cpp.

References Ecs::RegistryManager::get().

Here is the call graph for this function:

◆ createRoot()

std::shared_ptr< RootNode > EngineCore::NodeFactory::createRoot ( bool disableCaching = false)
inlinestatic

Creates a new root node for a scene graph. This is the only way to create a parentless node, and should only be used by SceneGraph.

Parameters
disableCachingIf true, the world matrix will be recalculated every time it is requested.
Returns
std::shared_ptr<RootNode> The newly created root node.

Definition at line 344 of file SceneGraph.h.

References Ecs::RegistryManager::get().

Here is the call graph for this function:

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