1 #ifndef MSP_GL_SCENE_H_
2 #define MSP_GL_SCENE_H_
5 #include <msp/datafile/objectloader.h>
7 #include "renderable.h"
14 Scenes are containers for other Renderables. This is a base class that can't
15 be instantiated. Examples of available Scene types are SimpleScene,
16 InstancedScene and OrderedScene.
18 class Scene: public Renderable
21 class Loader: public DataFile::CollectionObjectLoader<Scene>
24 typedef std::map<std::string, Renderable *> ContentMap;
30 Loader(Scene &, Collection &);
31 Loader(Scene &, Collection &, ContentMap &);
35 void object(const std::string &);
36 void object_tagged(const std::string &, const std::string &);
40 // XXX If a loaded renderable is removed from the scene it needs to be removed from here as well
41 std::vector<Renderable *> owned_data;
42 mutable Matrix culling_matrix;
43 mutable Vector4 frustum_edges[6];
48 Scene &operator=(const Scene &);
52 virtual void add(Renderable &) = 0;
53 virtual void remove(Renderable &) = 0;
56 bool setup_frustum(const Renderer &) const;
57 bool frustum_cull(const Renderable &) const;