X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fscene.h;fp=source%2Fscene.h;h=611f3508e2d7e103a592787aa5e08ea75f0f1625;hb=802832425b02be7b3ccb7d585fe63f4b68b5275f;hp=687c581fe5d4070c27d6e62819be4a3f8bff48aa;hpb=856ed578b7b7b79f2156b3e2b94bdea31d8fe2db;p=libs%2Fgl.git diff --git a/source/scene.h b/source/scene.h index 687c581f..611f3508 100644 --- a/source/scene.h +++ b/source/scene.h @@ -4,12 +4,11 @@ #include #include #include "renderable.h" +#include "vector.h" namespace Msp { namespace GL { -class Culler; - /** Scenes are containers for other Renderables. This is a base class that can't be instantiated. Examples of available Scene types are SimpleScene, @@ -29,7 +28,7 @@ public: protected: std::list owned_data; - std::list cullers; + mutable Vector3 frustum_edges[4]; Scene() { } private: @@ -41,15 +40,12 @@ public: virtual void add(const Renderable &) = 0; virtual void remove(const Renderable &) = 0; - void add_culler(Culler &); - void remove_culler(Culler &); - using Renderable::render; virtual void render(const Tag & = Tag()) const; protected: - virtual void setup_cullers(const Renderer &) const; - virtual bool cull(const Renderer &, const Renderable &) const; + void setup_frustum(const Renderer &) const; + bool frustum_cull(const Renderer &, const Renderable &) const; }; } // namespace GL