|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
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>
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. | |
| void | reserveRootChildren (size_t additionalChildren) |
| Reserves space for additional root children to avoid reallocations during bulk spawning. | |
| std::shared_ptr< SceneNode > | createNode (const Ecs::Transform &transform, const 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< SceneNode > | root_ |
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.
Definition at line 194 of file SceneGraph.h.
|
explicit |
Constructs a new Scene Graph object, initializing the root node.
| std::shared_ptr< SceneNode > Engine::Entities::SceneGraph::createNode | ( | const Ecs::Transform & | transform, |
| const std::shared_ptr< SceneNode > & | parent, | ||
| bool | disableCaching = false ) |
Creates a node which tells you where an object is in the scene.
| transform | world transform where the node should be |
| parent | the parent node |
| disableCaching | if 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 |
|
inlinenodiscard |
Gets the root node of the scene graph.
Definition at line 205 of file SceneGraph.h.
References root_.
| void Engine::Entities::SceneGraph::reserveRootChildren | ( | size_t | additionalChildren | ) |
Reserves space for additional root children to avoid reallocations during bulk spawning.
|
private |
Definition at line 195 of file SceneGraph.h.
Referenced by getRoot().