SparrowEngine/scene.h
2015-09-24 11:41:23 +02:00

34 lines
531 B
C++

#ifndef SCENE_H
#define SCENE_H
#include <vector>
#include <string>
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;
};
class Scene : public ContainerNode
{
public:
Scene(std::string name);
~Scene();
private:
std::string m_name;
};
#endif // SCENE_H