24 _linearLocalTime(0.0f),
185 case EC_outQuad: y = -pow(x - 1.0f, 2.0f) + 1.0f;
break;
186 case EC_inOutQuad: y = (x < 0.5f) ? 2.0f * pow(x, 2.0f) : -2.0f * pow(x - 1.0f, 2.0f) + 1.0f;
break;
187 case EC_outInQuad: y = (x < 0.5f) ? -2.0f * pow(x - 0.5f, 2.0f) + 0.5f : 2.0f * pow(x - 0.5f, 2.0f) + 0.5f;
break;
190 case EC_outCubic: y = pow(x - 1.0f, 3.0f) + 1.0f;
break;
191 case EC_inOutCubic: y = (x < 0.5f) ? 4.0f * pow(x, 3.0f) : 4.0f * pow(x - 1.0f, 3.0f) + 1.0f;
break;
192 case EC_outInCubic: y = 4.0f * pow(x - 0.5f, 3.0f) + 0.5f;
break;
195 case EC_outQuart: y = -pow(x - 1.0f, 4.0f) + 1.0f;
break;
196 case EC_inOutQuart: y = (x < 0.5f) ? 8.0f * pow(x, 4.0f) : -8.0f * pow(x - 1.0f, 4.0f) + 1.0f;
break;
197 case EC_outInQuart: y = (x < 0.5f) ? -8.0f * pow(x - 0.5f, 4.0f) + 0.5f : 8.0f * pow(x - 0.5f, 4.0f) + 0.5f;
break;
200 case EC_outQuint: y = pow(x - 1.0f, 5.0f) + 1.0f;
break;
201 case EC_inOutQuint: y = (x < 0.5f) ? 16.0f * pow(x, 5.0f) : 16.0f * pow(x - 1.0f, 5.0f) + 1.0f;
break;
202 case EC_outInQuint: y = 16.0f * pow(x - 0.5f, 5.0f) + 0.5f;
break;
225 case EC_outQuad: y = 1.0f - sqrt(1.0f - x);
break;
226 case EC_inOutQuad: y = (x < 0.5f) ? sqrt(x) / sqrt(2.0f) : 1.0f - sqrt(1.0f - x) / sqrt(2.0f);
break;
227 case EC_outInQuad: y = (x < 0.5f) ? 0.5f - 0.25f * sqrt(4.0f - 8.0f * x) : 0.5f + 0.25f * sqrt(8.0f * x - 4.0f);
break;
229 case EC_inCubic: y = pow(x, 1.0f / 3.0f);
break;
230 case EC_outCubic: y = 1.0f - pow(1.0f - x, 1.0f / 3.0f);
break;
231 case EC_inOutCubic: y = (x < 0.5f) ? pow(x, 1.0f / 3.0f) / pow(4.0f, 1.0f / 3.0f) : 1.0f - pow(1.0f - x, 1.0f / 3.0f) / pow(4.0f, 1.0f / 3.0f);
break;
232 case EC_outInCubic: y = (x < 0.5f) ? -pow((0.5f - x) / 4.0f, 1.0f / 3.0f) + 0.5f : pow((x - 0.5f) / 4.0f, 1.0f / 3.0f) + 0.5f;
break;
234 case EC_inQuart: y = pow(x, 1.0f / 4.0f);
break;
235 case EC_outQuart: y = 1.0f - pow(1.0f - x, 1.0f / 4.0f);
break;
236 case EC_inOutQuart: y = (x < 0.5f) ? pow(x, 1.0f / 4.0f) / pow(8.0f, 1.0f / 4.0f) : 1.0f - pow(1.0f - x, 1.0f / 4.0f) / pow(8.0f, 1.0f / 4.0f);
break;
237 case EC_outInQuart: y = (x < 0.5f) ? -pow(0.5f - x, 1.0f / 4.0f) / pow(8.0f, 1.0f / 4.0f) + 0.5f : pow(x - 0.5f, 1.0f / 4.0f) / pow(8.0f, 1.0f / 4.0f) + 0.5f;
break;
239 case EC_inQuint: y = pow(x, 1.0f / 5.0f);
break;
240 case EC_outQuint: y = 1.0f - pow(1.0f - x, 1.0f / 5.0f);
break;
241 case EC_inOutQuint: y = (x < 0.5f) ? pow(x, 1.0f / 5.0f) / pow(16.0f, 1.0f / 5.0f) : 1.0f - pow(1.0f - x, 1.0f / 5.0f) / pow(16.0f, 1.0f / 5.0f);
break;
242 case EC_outInQuint: y = (x < 0.5f) ? -pow(0.5f - x, 1.0f / 5.0f) / pow(16.0f, 1.0f / 5.0f) + 0.5f : pow(x - 0.5f, 1.0f / 5.0f) / pow(16.0f, 1.0f / 5.0f) + 0.5f;
break;
@ EC_inOutQuart
quartic easing in and then out
@ EC_inCubic
cubic in easing in, acceleration from zero velocity
@ EC_outQuart
quartic easing out, decelerating to zero velocity
@ EC_outInQuint
quintic easing out and then in
@ EC_inOutCubic
cubic easing in and then out
@ EC_outCubic
cubic easing out, decelerating to zero velocity
@ EC_outInSine
sine easing out and then in
@ EC_outInQuad
quadratic easing out and then in
@ EC_inOutQuad
quadratic easing in and then out
@ EC_inOutSine
sine easing in and then out
@ EC_outInCubic
cubic easing out and then in
@ EC_inSine
sine easing in, acceleration from zero velocity
@ EC_inQuart
quartic easing in, acceleration from zero velocity
@ EC_outQuint
quintic easing out, decelerating to zero velocity
@ EC_outQuad
quadratic easing out, decelerating to zero velocity
@ EC_linear
linear easing with constant velocity
@ EC_inOutQuint
quintic easing in and then out
@ EC_outInQuart
quartic easing out and then in
@ EC_inQuad
quadratic easing in, acceleration from zero velocity
@ EC_inQuint
quintic easing in, acceleration from zero velocity
@ EC_outSine
sine easing out, decelerating to zero velocity
@ AL_pingPongLoop
loop forward and backwards
@ AL_pingPong
play once in two directions
void skipToPrevKeyframe()
SLfloat _localTime
the current local timestamp (eased time)
SLEasingCurve _easing
easing modifier curve (to customize start and end point easing)
SLshort _playbackDir
the current playback direction
SLfloat localTime() const
SLfloat _playbackRate
the current playback speed
SLbool _gotChanged
Did this playback change in the last frame.
SLbool _enabled
is this animation running
SLfloat _linearLocalTime
linear local time used for _easing propert
SLAnimLooping _loopingBehaviour
We support different looping behaviours.
SLfloat calcEasingTimeInv(SLfloat time) const
void advanceTime(SLfloat delta)
SLAnimation * _animation
the animation this plays is referencing
SLAnimPlayback(SLAnimation *parent, SLfloat weight=1.0f)
SLfloat calcEasingTime(SLfloat time) const
Applies the easing time curve to the input time.
void skipToNextKeyframe()
SLAnimation is the base container for all animation data.
SLfloat lengthSec() const
SLfloat prevKeyframeTime(SLfloat time)
SLfloat nextKeyframeTime(SLfloat time)
static const float ONEOVERPI