]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animatedobject.h
Add a class to unify loading coordinate transforms
[libs/gl.git] / source / animatedobject.h
index 4782951d10fb9207a77e26a6d32cff367a27c3db..73c39e2ca8b2a240e5647ef6d8b6ae02914a0609 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <vector>
 #include <msp/datafile/objectloader.h>
+#include "keyframe.h"
 #include "matrix.h"
 #include "objectinstance.h"
 
@@ -10,8 +11,7 @@ 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.
+An object instance that can be animated by an AnimationPlayer.
 */
 class AnimatedObject: public ObjectInstance
 {
@@ -26,10 +26,10 @@ public:
                void rotation(float, float, float, float);
                void scale(float, float, float);
                void scale_uniform(float);
+               void transform();
        };
 
 private:
-       Matrix matrix;
        std::vector<float> pose_data;
        ProgramData *shdata;
 
@@ -37,8 +37,12 @@ public:
        AnimatedObject(const Object &);
        ~AnimatedObject();
 
-       void set_matrix(const Matrix &);
        void set_pose_matrix(unsigned, const Matrix &);
+       ProgramData &get_shader_data();
+       const ProgramData &get_shader_data() const;
+
+       // Deprecated
+       void set_uniform(const std::string &, const KeyFrame::AnimatedUniform &);
 
        virtual const Matrix *get_matrix() const { return &matrix; }