X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fanimation.h;h=dd3cc688c41290316450858a7d540a79e93dcfb8;hp=1ae571e7db217e8e624c6475dc6c4731ebf08a9d;hb=89a1ada18430079896cfb28862e61bb32d66b8a0;hpb=3f7c493e13b7108098539078b729cffc095c304b diff --git a/source/animation.h b/source/animation.h index 1ae571e7..dd3cc688 100644 --- a/source/animation.h +++ b/source/animation.h @@ -60,7 +60,6 @@ private: struct TimedKeyFrame { - const Animation &animation; const TimedKeyFrame *prev; Time::TimeDelta time; Time::TimeDelta delta_t; @@ -69,12 +68,10 @@ private: std::vector uniforms; std::vector pose_matrices; - TimedKeyFrame(const Animation &); - void prepare(); + TimedKeyFrame(); + void prepare(const Animation &); }; - typedef std::list KeyFrameList; - struct UniformInfo { std::string name; @@ -87,8 +84,8 @@ public: class Iterator { private: - const Animation &animation; - KeyFrameList::const_iterator iter; + const Animation *animation; + std::vector::const_iterator iter; Time::TimeDelta time_since_keyframe; bool end; @@ -105,7 +102,7 @@ public: private: const Armature *armature; - KeyFrameList keyframes; + std::vector keyframes; bool looping; std::vector uniforms; @@ -122,6 +119,7 @@ public: void add_keyframe(const Time::TimeDelta &, const KeyFrame &); private: + void add_keyframe(const Time::TimeDelta &, const RefPtr &); void prepare_keyframe(TimedKeyFrame &); public: