X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fscene.h;h=27656a59db2fbbdc5af57de1daf498361f5f07a5;hb=1bd2a77b4999d240a27e13a9069e8fca3410d363;hp=687c581fe5d4070c27d6e62819be4a3f8bff48aa;hpb=de5d710b87879d6a0b06407da096ec505f8b7679;p=libs%2Fgl.git diff --git a/source/scene.h b/source/scene.h index 687c581f..27656a59 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 Vector4 frustum_edges[6]; 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; + bool setup_frustum(const Renderer &) const; + bool frustum_cull(const Renderable &) const; }; } // namespace GL