36 lines
538 B
C++
36 lines
538 B
C++
#ifndef SCENE_H
|
|
#define SCENE_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
class SceneNode;
|
|
class ContainerNode;
|
|
|
|
class Scene
|
|
{
|
|
public:
|
|
Scene();
|
|
void update();
|
|
private:
|
|
ContainerNode* m_root;
|
|
};
|
|
|
|
class SceneNode
|
|
{
|
|
public:
|
|
SceneNode* m_parent;
|
|
virtual void update() = 0;
|
|
};
|
|
|
|
class ContainerNode : public SceneNode
|
|
{
|
|
public:
|
|
virtual void update();
|
|
void addChild(const std::string &childName);
|
|
void removeChild(const std::string &childName);
|
|
protected:
|
|
std::vector<SceneNode*> m_children;
|
|
};
|
|
|
|
#endif // SCENE_H
|