|
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. | |
| std::shared_ptr< SceneNode > | 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. | |
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 266 of file SceneGraph.h.
|
explicit |
Constructs a new Scene Graph object, initializing the root node.
Definition at line 241 of file SceneGraph.cpp.
References root.
| 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.
| 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 |
Definition at line 245 of file SceneGraph.cpp.
References EngineCore::NodeFactory::createNode(), and Ecs::LocalTransform::matrix.
|
inline |
Gets the root node of the scene graph.
Definition at line 285 of file SceneGraph.h.
References root.
|
private |
Definition at line 268 of file SceneGraph.h.
Referenced by getRoot(), and SceneGraph().