]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animatedobject.h
Basic animation support
[libs/gl.git] / source / animatedobject.h
diff --git a/source/animatedobject.h b/source/animatedobject.h
new file mode 100644 (file)
index 0000000..4f6085f
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef MSP_GL_ANIMATEDOBJECT_H_
+#define MSP_GL_ANIMATEDOBJECT_H_
+
+#include "matrix.h"
+#include "objectinstance.h"
+
+namespace Msp {
+namespace GL {
+
+/**
+An object instance that can be animated.  Despite the name, this can also be
+useful for displaying objects at a static position.
+*/
+class AnimatedObject: public ObjectInstance
+{
+private:
+       Matrix matrix;
+
+public:
+       AnimatedObject(const Object &);
+
+       void set_matrix(const Matrix &);
+
+       virtual void setup_render(Renderer &, const Tag &) const;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif