]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animatedobject.cpp
Basic animation support
[libs/gl.git] / source / animatedobject.cpp
diff --git a/source/animatedobject.cpp b/source/animatedobject.cpp
new file mode 100644 (file)
index 0000000..df0217a
--- /dev/null
@@ -0,0 +1,22 @@
+#include "animatedobject.h"
+#include "renderer.h"
+
+namespace Msp {
+namespace GL {
+
+AnimatedObject::AnimatedObject(const Object &o):
+       ObjectInstance(o)
+{ }
+
+void AnimatedObject::set_matrix(const Matrix &m)
+{
+       matrix = m;
+}
+
+void AnimatedObject::setup_render(Renderer &renderer, const Tag &) const
+{
+       renderer.matrix_stack() *= matrix;
+}
+
+} // namespace GL
+} // namespace Msp