Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Entities::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< SceneNode > createNode (const std::shared_ptr< SceneNode > &parent, 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< RootNode > createRoot ()
 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.

Definition at line 273 of file SceneGraph.h.

Member Function Documentation

◆ createNode()

std::shared_ptr< SceneNode > Engine::Entities::NodeFactory::createNode ( const std::shared_ptr< SceneNode > & parent,
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.

Referenced by Engine::Entities::Scene::spawnActorAttached().

Here is the caller graph for this function:

◆ createNodes()

std::vector< std::shared_ptr< SceneNode > > Engine::Entities::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.

◆ createRoot()

std::shared_ptr< RootNode > Engine::Entities::NodeFactory::createRoot ( )
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.

Returns
std::shared_ptr<RootNode> The newly created root node.

Definition at line 305 of file SceneGraph.h.

References Engine::Ecs::RegistryManager::get().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/World/SceneGraph.h