virtual void apply(float, KeyFrame::AnimatedUniform &) const;
};
+ template<unsigned N>
+ struct ExtractUniform
+ {
+ const std::string &name;
+
+ ExtractUniform(const std::string &n): name(n) { }
+
+ bool operator()(const KeyFrame &, typename Interpolate::SplineValue<float, N>::Type &) const;
+ };
+
struct TimedKeyFrame
{
Time::TimeDelta time;
void add_keyframe(const Time::TimeDelta &, const RefPtr<const KeyFrame> &, float, float);
void prepare_keyframe(TimedKeyFrame &);
void create_curves();
- template<unsigned N>
- void create_uniform_curve(const std::string &);
+ template<unsigned N, typename T>
+ void create_curve(CurveTarget target, const T &);
+ static bool extract_position(const KeyFrame &, Vector3 &);
+ static bool extract_euler(const KeyFrame &, Vector3 &);
+ static bool extract_scale(const KeyFrame &, Vector3 &);
public:
void add_event(const Time::TimeDelta &, const std::string &, const Variant & = Variant());