![]() |
Murl Engine API
Version 2018.3
|
The easing class implements the functions of the predefined IEnums::Interpolation curves. More...
#include <murl_math_easing.h>
The easing class implements the functions of the predefined IEnums::Interpolation curves.
Smoothstep functions description can be found at http://wikipedia.org/wiki/Smoothstep
Easing functions description can be found at http://easings.net
Public Types | |
typedef DataType | ValueType |
The template parameter value type. More... | |
typedef DataType(* | Interpolate) (DataType x) |
Definition of the easing function type. More... | |
Static Public Member Functions | |
static DataType | Constant (DataType x) |
Constant interpolation. More... | |
static DataType | Linear (DataType x) |
Linear interpolation. More... | |
static DataType | SmoothstepInOut (DataType x) |
Smoothstep "in-out" interpolation. More... | |
static DataType | SmoothstepIn (DataType x) |
Smoothstep "in" interpolation. More... | |
static DataType | SmoothstepOut (DataType x) |
Smoothstep "out" interpolation. More... | |
static DataType | SmoothstepOutIn (DataType x) |
Smoothstep "out-in" interpolation. More... | |
static DataType | SmootherstepInOut (DataType x) |
Smootherstep "in-out" interpolation. More... | |
static DataType | SmootherstepIn (DataType x) |
Smootherstep "in" interpolation. More... | |
static DataType | SmootherstepOut (DataType x) |
Smootherstep "out" interpolation. More... | |
static DataType | SmootherstepOutIn (DataType x) |
Smootherstep "out-in" interpolation. More... | |
static DataType | EaseIn (DataType x) |
Ease (cubic) "in" interpolation. More... | |
static DataType | EaseOut (DataType x) |
Ease (cubic) "out" interpolation. More... | |
static DataType | EaseInOut (DataType x) |
Ease (cubic) "in-out" interpolation. More... | |
static DataType | EaseOutIn (DataType x) |
Ease (cubic) "out-in" interpolation. More... | |
static DataType | EaseQuartIn (DataType x) |
Ease Quart "in" interpolation. More... | |
static DataType | EaseQuartOut (DataType x) |
Ease Quart "out" interpolation. More... | |
static DataType | EaseQuartInOut (DataType x) |
Ease Quart "in-out" interpolation. More... | |
static DataType | EaseQuartOutIn (DataType x) |
Ease Quart "out-in" interpolation. More... | |
static DataType | EaseExponentialIn (DataType x) |
Ease Exponential "in" interpolation. More... | |
static DataType | EaseExponentialOut (DataType x) |
Ease Exponential "out" interpolation. More... | |
static DataType | EaseExponentialInOut (DataType x) |
Ease Exponential "in-out" interpolation. More... | |
static DataType | EaseExponentialOutIn (DataType x) |
Ease Exponential "out-in" interpolation. More... | |
static DataType | EaseCircularIn (DataType x) |
Ease Circular "in" interpolation. More... | |
static DataType | EaseCircularOut (DataType x) |
Ease Circular "out" interpolation. More... | |
static DataType | EaseCircularHelper (DataType x) |
Ease Circular helper interpolation. More... | |
static DataType | EaseCircularInOut (DataType x) |
Ease Circular "in-out" interpolation. More... | |
static DataType | EaseCircularOutIn (DataType x) |
Ease Circular "out-in" interpolation. More... | |
static DataType | EaseBackIn (DataType x) |
Ease Back "in" interpolation. More... | |
static DataType | EaseBackOut (DataType x) |
Ease Back "out" interpolation. More... | |
static DataType | EaseBackInOut (DataType x) |
Ease Back "in-out" interpolation. More... | |
static DataType | EaseBackOutIn (DataType x) |
Ease Back "out-in" interpolation. More... | |
static DataType | EaseElasticIn (DataType x) |
Ease Elastic "in" interpolation. More... | |
static DataType | EaseElasticOut (DataType x) |
Ease Elastic "out" interpolation. More... | |
static DataType | EaseElasticInOut (DataType x) |
Ease Elastic "in-out" interpolation. More... | |
static DataType | EaseElasticOutIn (DataType x) |
Ease Elastic "out-in" interpolation. More... | |
static DataType | EaseBounceOut (DataType x) |
Ease Bounce "out" interpolation. More... | |
static DataType | EaseBounceIn (DataType x) |
Ease Bounce "in" interpolation. More... | |
static DataType | EaseBounceInOut (DataType x) |
Ease Bounce "in-out" interpolation. More... | |
static DataType | EaseBounceOutIn (DataType x) |
Ease Bounce "in-out" interpolation. More... | |
typedef DataType Murl::Math::Easing< DataType >::ValueType |
The template parameter value type.
typedef DataType(* Murl::Math::Easing< DataType >::Interpolate) (DataType x) |
Definition of the easing function type.
|
inlinestatic |
Constant interpolation.
Function: f(x)=0
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Linear interpolation.
Function: f(x)=x
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smoothstep "in-out" interpolation.
Function: f(x)=(x^2)*(3-2*x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smoothstep "in" interpolation.
Function: f(x)=SmoothstepInOut(x/2)*2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smoothstep "out" interpolation.
Function: f(x)=SmoothstepInOut((x+1)/2)*2-1
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smoothstep "out-in" interpolation.
Function: f(x)=(x < 0.5) ? SmoothstepInOut(x+0.5)-0.5 : SmoothstepInOut(x-0.5)+0.5
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smootherstep "in-out" interpolation.
Function: f(x)=(x^3)*(x*(6*x-15)+10)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smootherstep "in" interpolation.
Function: f(x)=SmootherstepInOut(x/2)*2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smootherstep "out" interpolation.
Function: f(x)=SmootherstepInOut((x+1)/2)*2-1
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Smootherstep "out-in" interpolation.
Function: f(x)=(x < 0.5) ? SmootherstepInOut(x+0.5)-0.5 : SmootherstepInOut(x-0.5)+0.5
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease (cubic) "in" interpolation.
Function: f(x)=x^3
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease (cubic) "out" interpolation.
Function: f(x)=1-EaseIn(1-x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease (cubic) "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseIn(2*x)/2 : 1-EaseIn(2-2*x)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease (cubic) "out-in" interpolation.
Function: f(x)=4*EaseIn(x-0.5)+0.5
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Quart "in" interpolation.
Function: f(x)=x^4
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Quart "out" interpolation.
Function: f(x)=1-EaseQuartIn(1-x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Quart "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseQuartIn(2*x)/2 : 1-EaseQuartIn(2-2*x)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Quart "out-in" interpolation.
Function: f(x)=(x < 0.5) ? 0.5-EaseQuartIn(1-2*x)/2 : 0.5+EaseQuartIn(2*x-1)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Exponential "in" interpolation.
Function: f(x)=(2^8x)*x/256
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Exponential "out" interpolation.
Function: f(x)=1-EaseExponentialIn(1-x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Exponential "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseExponentialIn(2*x)/2 : 1-EaseExponentialIn(2-2*x)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Exponential "out-in" interpolation.
Function: f(x)=(x < 0.5) ? 0.5-EaseExponentialIn(1-2*x)/2 : 0.5+EaseExponentialIn(2*x-1)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Circular "in" interpolation.
Function: f(x)=1-sqrt(1-x^2)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Circular "out" interpolation.
Function: f(x)=sqrt((2-x)*x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Circular helper interpolation.
Function: f(x)=sqrt(x-x^2)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Circular "in-out" interpolation.
Function: f(x)=(x < 0.5) ? 0.5-EaseCircularHelper(x+0.5) : 0.5+EaseCircularHelper(x-0.5)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Circular "out-in" interpolation.
Function: f(x)=(x < 0.5) ? EaseCircularHelper(x) : 1-EaseCircularHelper(x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Back "in" interpolation.
Function: f(x)=(x^3)-x*sin(x*PI)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Back "out" interpolation.
Function: f(x)=1-EaseBackIn(1-x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Back "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseBackIn(2*x)/2 : 1-EaseBackIn(2-2*x)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Back "out-in" interpolation.
Function: f(x)=(x < 0.5) ? 0.5-EaseBackIn(1-2*x)/2 : 0.5+EaseBackIn(2*x-1)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Elastic "in" interpolation.
Function: f(x)=sin(13*PI/2*x)*2^(10*(x-1))
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Elastic "out" interpolation.
Function: f(x)=1-EaseElasticIn(1-x)
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Elastic "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseElasticIn(2*x)/2 : 1-EaseElasticIn(2-2*x)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Elastic "out-in" interpolation.
Function: f(x)=(x < 0.5) ? 0.5-EaseElasticIn(1-2*x)/2 : 0.5+EaseElasticIn(2*x-1)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Bounce "out" interpolation.
Function: f(x)= ... = a halve and three shrinking bounces
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Bounce "in" interpolation.
Function: f(x)=1-EaseBounceOut(1-x) = three and a halve growing bounces
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Bounce "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseBounceIn(2*x)/2 : 0.5+EaseBounceOut(2*x-1)/2
x | The value to interpolate in range [0 .. 1]. |
|
inlinestatic |
Ease Bounce "in-out" interpolation.
Function: f(x)=(x < 0.5) ? EaseBounceOut(2*x)/2 : 0.5+EaseBounceIn(2*x-1)/2
x | The value to interpolate in range [0 .. 1]. |