]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/scene.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / render / scene.h
index f89f10daf26691412de2f950925b11b524d9c783..e6115ae56541d9e9907818da03c780f45f80660d 100644 (file)
@@ -11,9 +11,15 @@ namespace Msp {
 namespace GL {
 
 /**
-Scenes are containers for other Renderables.  This is a base class that can't
-be instantiated.  Examples of available Scene types are SimpleScene,
-InstancedScene and OrderedScene.
+Container for other renderables.  Subclasses provide different ways of
+rendering the contents.
+
+All types of Scenes perform frustum culling on the contents, skipping
+renderables whose bounding sphere is fully outside the view volume.  If a
+bounding sphere cannot be determined, culling is not performed on that
+renderable.
+
+SimpleScene is a good default choice if there are no specific requirements.
 */
 class Scene: public Renderable
 {
@@ -34,6 +40,7 @@ protected:
        private:
                Loader(Scene &, Collection &, ContentMap *);
 
+               void array(const std::string &);
                void object(const std::string &);
                void object_tagged(const std::string &, const std::string &);
                void scene(const std::string &);
@@ -53,24 +60,13 @@ public:
        };
 
 protected:
-       mutable Matrix culling_matrix;
-       mutable Vector4 frustum_edges[6];
-
        Scene() = default;
-private:
-       Scene(const Scene &);
-       Scene &operator=(const Scene &);
 public:
        virtual ~Scene() = default;
 
        virtual void add(Renderable &) = 0;
        virtual void remove(Renderable &) = 0;
 
-protected:
-       bool setup_frustum(const Renderer &) const;
-       bool frustum_cull(const Renderable &) const;
-
-public:
        template<typename T>
        static void register_type(const std::string &);
 private: