X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fanimation.h;h=43cfc2894013016ec9018244e60c5bff0b2a7f26;hp=92c177b685fead92aa15ee34c8721af1e16e4924;hb=49f1812b3e5ad73748015df52d0e4dee17246036;hpb=ff85f90d33023d908c534b0bf5d9a65e9fc2cce2 diff --git a/source/animation.h b/source/animation.h index 92c177b6..43cfc289 100644 --- a/source/animation.h +++ b/source/animation.h @@ -36,6 +36,11 @@ public: void init(); virtual void finish(); + void load_kf(const std::string &, bool); + void load_kf_inline(bool); + + void control_keyframe(const std::string &); + void control_keyframe_inline(); void event(const std::string &); void event1i(const std::string &, int); void event1f(const std::string &, float); @@ -77,7 +82,7 @@ private: typedef typename Interpolate::SplineKnot Knot; private: - Interpolate::Spline spline; + Interpolate::Spline spline; public: ValueCurve(CurveTarget, const std::vector &); @@ -99,9 +104,8 @@ private: struct TimedKeyFrame { Time::TimeDelta time; - float start_slope; - float end_slope; RefPtr keyframe; + bool control; }; struct Event @@ -162,8 +166,9 @@ public: void add_keyframe(const Time::TimeDelta &, const KeyFrame &); void add_keyframe(const Time::TimeDelta &, const KeyFrame &, float); void add_keyframe(const Time::TimeDelta &, const KeyFrame &, float, float); + void add_control_keyframe(const KeyFrame &); private: - void add_keyframe(const Time::TimeDelta &, const RefPtr &, float, float); + void add_keyframe(const Time::TimeDelta &, const RefPtr &, bool); void prepare_keyframe(TimedKeyFrame &); void create_curves(); template