3 #include "keyframe_player/Vec2f.h"
19 Keyframe() : type(TYPE_DEFAULT), t(0.0), x(0.0), v(0.0), a(0.0), effort(0.0), suppLeftLeg(0.0), suppRightLeg(0.0), pGain(0.0), iGain(0.0), dGain(0.0), gainSelect(nonE), roll(0.0), pitch(0.0), yaw(0.0),playingIndex(0) {}
20 Keyframe(
double t,
double x,
double v,
double effort,
double suppLeftLeg,
double suppRightLeg,
double pGain,
double iGain,
double dGain,
double limit, gainSelectEnum gainSelect,
double roll,
double pitch,
double yaw) : type(TYPE_DEFAULT), t(t), x(x), v(v), a(0.0), effort(effort), suppLeftLeg(suppLeftLeg), suppRightLeg(suppRightLeg), pGain(pGain), iGain(iGain), dGain(dGain), limit(limit), gainSelect(gainSelect), roll(roll), pitch(pitch), yaw(yaw),playingIndex(0) {}
21 virtual ~Keyframe() {};
31 double pGain;
double iGain;
double dGain;
double limit; gainSelectEnum gainSelect;
double roll;
double pitch;
double yaw;
42 void set(
double t,
double x,
double v,
double effort,
double suppLeftLeg,
double suppRightLeg,
double pGain,
double iGain,
double dGain,
double limit, gainSelectEnum gainSelect,
double roll,
double pitch,
double yaw);
44 void setLocation(Vec2f);
45 void relocateBy(Vec2f);
47 inline bool operator<(
const Keyframe& k)
const {
return (t < k.t);}
48 inline bool operator<=(
const Keyframe& k)
const {
return (t <= k.t);}
49 inline bool operator>(
const Keyframe& k)
const {
return (t > k.t);}
50 inline bool operator>=(
const Keyframe& v)
const {
return (t >= v.t);}
51 inline bool operator==(
const Keyframe& k)
const {
return (t == k.t && x == k.x && v == k.v);}
52 inline bool operator!=(
const Keyframe& k)
const {
return (t != k.t || x != k.x || v != k.v);}
55 QDebug operator<<(QDebug dbg,
const Keyframe &k);