]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderable.h
Add a method of getting the model matrix of a Renderable
[libs/gl.git] / source / renderable.h
index 2342ae288cfed9b4d8fa61f25bf932ae47058540..3432a87ee77ed4db3c72600061127bef767c768d 100644 (file)
@@ -7,6 +7,7 @@
 namespace Msp {
 namespace GL {
 
+class Matrix;
 class Renderer;
 
 /**
@@ -27,6 +28,10 @@ public:
        returned value is treated as opaque. */
        virtual long get_instance_key() const { return 0; }
 
+       /** Returns the model matrix of the Renderable.  Null is returned if no such
+       matrix exists. */
+       virtual const Matrix *get_matrix() const { return 0; }
+
        /** Renders the renderable without a renderer.  This can be convenient in
        some simple cases, but most renderables don't need to implement this
        method. */