]> git.tdb.fi Git - libs/gl.git/blobdiff - source/objectinstance.h
Add an interface for obtaining bounding spheres from renderables
[libs/gl.git] / source / objectinstance.h
index 6094517b6d5c062ca220b14e686e5dade8802335..6a8749766f39ca08223c07d8971435c3abe1eebb 100644 (file)
@@ -2,12 +2,12 @@
 #define MSP_GL_OBJETCINSTANCE_H_
 
 #include <string>
+#include "object.h"
 #include "renderable.h"
 
 namespace Msp {
 namespace GL {
 
-class Object;
 class ProgramData;
 
 /**
@@ -29,6 +29,8 @@ public:
        const Object &get_object() const { return object; }
        virtual long get_instance_key() const { return reinterpret_cast<long>(&object); }
 
+       virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return object.get_bounding_sphere(); }
+
        virtual void render(const Tag &tag = Tag()) const;
        virtual void render(Renderer &, const Tag & = Tag()) const;