Blender V4.5
easing.cc File Reference
#include "BLI_math_base.h"
#include "BLI_easing.h"
#include "BLI_strict_flags.h"

Go to the source code of this file.

Macros

#define USE_ELASTIC_BLEND
 

Functions

float BLI_easing_back_ease_in (float time, float begin, float change, float duration, float overshoot)
 
float BLI_easing_back_ease_out (float time, float begin, float change, float duration, float overshoot)
 
float BLI_easing_back_ease_in_out (float time, float begin, float change, float duration, float overshoot)
 
float BLI_easing_bounce_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_bounce_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_bounce_ease_in_out (float time, float begin, float change, float duration)
 
float BLI_easing_circ_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_circ_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_circ_ease_in_out (float time, float begin, float change, float duration)
 
float BLI_easing_cubic_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_cubic_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_cubic_ease_in_out (float time, float begin, float change, float duration)
 
static float elastic_blend (float time, float change, float duration, float amplitude, float s, float f)
 
float BLI_easing_elastic_ease_in (float time, float begin, float change, float duration, float amplitude, float period)
 
float BLI_easing_elastic_ease_out (float time, float begin, float change, float duration, float amplitude, float period)
 
float BLI_easing_elastic_ease_in_out (float time, float begin, float change, float duration, float amplitude, float period)
 
float BLI_easing_expo_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_expo_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_expo_ease_in_out (float time, float begin, float change, float duration)
 
float BLI_easing_linear_ease (float time, float begin, float change, float duration)
 
float BLI_easing_quad_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_quad_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_quad_ease_in_out (float time, float begin, float change, float duration)
 
float BLI_easing_quart_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_quart_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_quart_ease_in_out (float time, float begin, float change, float duration)
 
float BLI_easing_quint_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_quint_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_quint_ease_in_out (float time, float begin, float change, float duration)
 
float BLI_easing_sine_ease_in (float time, float begin, float change, float duration)
 
float BLI_easing_sine_ease_out (float time, float begin, float change, float duration)
 
float BLI_easing_sine_ease_in_out (float time, float begin, float change, float duration)
 

Variables

static const float pow_min = 0.0009765625f
 
static const float pow_scale = 1.0f / (1.0f - 0.0009765625f)
 

Macro Definition Documentation

◆ USE_ELASTIC_BLEND

#define USE_ELASTIC_BLEND

Definition at line 16 of file easing.cc.

Function Documentation

◆ BLI_easing_back_ease_in()

float BLI_easing_back_ease_in ( float time,
float begin,
float change,
float duration,
float overshoot )

◆ BLI_easing_back_ease_in_out()

float BLI_easing_back_ease_in_out ( float time,
float begin,
float change,
float duration,
float overshoot )

◆ BLI_easing_back_ease_out()

float BLI_easing_back_ease_out ( float time,
float begin,
float change,
float duration,
float overshoot )

◆ BLI_easing_bounce_ease_in()

float BLI_easing_bounce_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_bounce_ease_in_out()

float BLI_easing_bounce_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_bounce_ease_out()

float BLI_easing_bounce_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_circ_ease_in()

float BLI_easing_circ_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_circ_ease_in_out()

float BLI_easing_circ_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_circ_ease_out()

float BLI_easing_circ_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_cubic_ease_in()

float BLI_easing_cubic_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_cubic_ease_in_out()

float BLI_easing_cubic_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_cubic_ease_out()

float BLI_easing_cubic_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_elastic_ease_in()

float BLI_easing_elastic_ease_in ( float time,
float begin,
float change,
float duration,
float amplitude,
float period )

◆ BLI_easing_elastic_ease_in_out()

float BLI_easing_elastic_ease_in_out ( float time,
float begin,
float change,
float duration,
float amplitude,
float period )

◆ BLI_easing_elastic_ease_out()

float BLI_easing_elastic_ease_out ( float time,
float begin,
float change,
float duration,
float amplitude,
float period )

◆ BLI_easing_expo_ease_in()

float BLI_easing_expo_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_expo_ease_in_out()

float BLI_easing_expo_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_expo_ease_out()

float BLI_easing_expo_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_linear_ease()

float BLI_easing_linear_ease ( float time,
float begin,
float change,
float duration )

Definition at line 282 of file easing.cc.

References begin(), and time.

Referenced by fcurve_eval_keyframes_interpolate().

◆ BLI_easing_quad_ease_in()

float BLI_easing_quad_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quad_ease_in_out()

float BLI_easing_quad_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quad_ease_out()

float BLI_easing_quad_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quart_ease_in()

float BLI_easing_quart_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quart_ease_in_out()

float BLI_easing_quart_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quart_ease_out()

float BLI_easing_quart_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quint_ease_in()

float BLI_easing_quint_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quint_ease_in_out()

float BLI_easing_quint_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_quint_ease_out()

float BLI_easing_quint_ease_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_sine_ease_in()

float BLI_easing_sine_ease_in ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_sine_ease_in_out()

float BLI_easing_sine_ease_in_out ( float time,
float begin,
float change,
float duration )

◆ BLI_easing_sine_ease_out()

float BLI_easing_sine_ease_out ( float time,
float begin,
float change,
float duration )

◆ elastic_blend()

static float elastic_blend ( float time,
float change,
float duration,
float amplitude,
float s,
float f )
static

When the amplitude is less than the change, we need to blend f when we're close to the crossing point (int time), else we get an ugly sharp falloff.

Definition at line 122 of file easing.cc.

References fabsf, l, and time.

Referenced by BLI_easing_elastic_ease_in(), BLI_easing_elastic_ease_in_out(), and BLI_easing_elastic_ease_out().

Variable Documentation

◆ pow_min

const float pow_min = 0.0009765625f
static

Definition at line 252 of file easing.cc.

Referenced by BLI_easing_expo_ease_in(), and BLI_easing_expo_ease_out().

◆ pow_scale

const float pow_scale = 1.0f / (1.0f - 0.0009765625f)
static

Definition at line 253 of file easing.cc.

Referenced by BLI_easing_expo_ease_in(), and BLI_easing_expo_ease_out().