17 #ifndef INTERPOLATOR_H_ 18 #define INTERPOLATOR_H_ 23 #include "JNIHelper.h" 24 #include "perfMonitor.h" 29 enum INTERPOLATOR_TYPE {
30 INTERPOLATOR_TYPE_LINEAR,
31 INTERPOLATOR_TYPE_EASEINQUAD,
32 INTERPOLATOR_TYPE_EASEOUTQUAD,
33 INTERPOLATOR_TYPE_EASEINOUTQUAD,
34 INTERPOLATOR_TYPE_EASEINCUBIC,
35 INTERPOLATOR_TYPE_EASEOUTCUBIC,
36 INTERPOLATOR_TYPE_EASEINOUTCUBIC,
37 INTERPOLATOR_TYPE_EASEINQUART,
38 INTERPOLATOR_TYPE_EASEINEXPO,
39 INTERPOLATOR_TYPE_EASEOUTEXPO,
42 struct InterpolatorParams {
44 INTERPOLATOR_TYPE type_;
55 INTERPOLATOR_TYPE type_;
59 std::list<InterpolatorParams> list_params_;
61 float GetFormula(
const INTERPOLATOR_TYPE type,
const float t,
const float b,
62 const float d,
const float c);
68 Interpolator& Set(
const float start,
const float dest,
69 const INTERPOLATOR_TYPE type,
double duration);
71 Interpolator& Add(
const float dest,
const INTERPOLATOR_TYPE type,
72 const double duration);
74 bool Update(
const double currentTime,
float& p);
Definition: gestureDetector.h:32