X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanimatedobject.h;h=f9b8824e1832932786189a99a9b2ca8a58eb2f3d;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hp=b7f480054275d44148ca714c659af2ad548ce0d2;hpb=3f7c493e13b7108098539078b729cffc095c304b;p=libs%2Fgl.git diff --git a/source/animatedobject.h b/source/animatedobject.h index b7f48005..f9b8824e 100644 --- a/source/animatedobject.h +++ b/source/animatedobject.h @@ -2,6 +2,7 @@ #define MSP_GL_ANIMATEDOBJECT_H_ #include +#include #include #include "keyframe.h" #include "matrix.h" @@ -11,13 +12,12 @@ 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 { public: - class Loader: public DataFile::ObjectLoader + class Loader: public DataFile::DerivedObjectLoader { public: Loader(AnimatedObject &); @@ -30,7 +30,6 @@ public: }; private: - Matrix matrix; std::vector pose_data; ProgramData *shdata; @@ -38,9 +37,11 @@ public: AnimatedObject(const Object &); ~AnimatedObject(); - void set_matrix(const Matrix &); void set_pose_matrix(unsigned, const Matrix &); - void set_uniform(const std::string &, const KeyFrame::AnimatedUniform &); + 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; }