Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
SceneGraph.h
Go to the documentation of this file.
1#ifndef ULT_SCENE_GRAPH_H_INCLUDED
2#define ULT_SCENE_GRAPH_H_INCLUDED
3
4#include "Node.h"
5
6namespace Ult
7{
8
12
18{
19public:
24 mRoot(nullptr)
25 {}
26
30 Release();
31 }
32
36 void Release() {
37 if (mRoot) {
38 delete mRoot;
39 mRoot = nullptr;
40 }
41 }
42
47 void AddNode(Node* node) {
48 if (!mRoot) {
49 mRoot = new Node();
50 }
51 mRoot->AddChild(node);
52 }
53
57 void Process() {
58 if (mRoot) {
59 mRoot->Process();
60 }
61 }
62
63private:
64 Node* mRoot;
65};
66
67} // namespace Ult
68
69#endif // ULT_SCENE_GRAPH_H_INCLUDED
70
Definition Node.h:12
~SceneGraph()
Definition SceneGraph.h:29
void AddNode(Node *node)
Definition SceneGraph.h:47
void Process()
Definition SceneGraph.h:57
void Release()
Definition SceneGraph.h:36
SceneGraph()
Definition SceneGraph.h:23
Definition Archive.h:13