]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animation.h
Refactor the Animation reference out of TimedKeyFrame
[libs/gl.git] / source / animation.h
index 929cb13f497318c3a91492cc1cf18d36584f267e..dd3cc688c41290316450858a7d540a79e93dcfb8 100644 (file)
@@ -60,7 +60,6 @@ private:
 
        struct TimedKeyFrame
        {
-               const Animation &animation;
                const TimedKeyFrame *prev;
                Time::TimeDelta time;
                Time::TimeDelta delta_t;
@@ -69,8 +68,8 @@ private:
                std::vector<KeyFrame::AnimatedUniform> uniforms;
                std::vector<MatrixInterpolation> pose_matrices;
 
-               TimedKeyFrame(const Animation &);
-               void prepare();
+               TimedKeyFrame();
+               void prepare(const Animation &);
        };
 
        struct UniformInfo
@@ -120,6 +119,7 @@ public:
 
        void add_keyframe(const Time::TimeDelta &, const KeyFrame &);
 private:
+       void add_keyframe(const Time::TimeDelta &, const RefPtr<const KeyFrame> &);
        void prepare_keyframe(TimedKeyFrame &);
 
 public: