Kanzi  3.9.7
Kanzi Engine API
kanzi::ElasticEasingFunction Struct Reference

Changes the value that resembles an oscillating spring until it comes to rest. More...

#include <kanzi/core.ui/animation/easing_curve.hpp>

Public Member Functions

 ElasticEasingFunction (float oscillations, float springiness)
 Creates an ElasticEasingFunction with configurable oscillations and springiness. More...
 
 ElasticEasingFunction ()
 Creates an ElasticEasingFunction with Oscillations and Springiness set to 3.0. More...
 
float operator() (float time) const
 Computes value of the easing function for the given time. More...
 

Public Attributes

float oscillations
 
float springiness
 

Detailed Description

Changes the value that resembles an oscillating spring until it comes to rest.

ElasticEasingFunction.png
Elastic easing function: ease in, ease out, and ease in-out

Constructor & Destructor Documentation

kanzi::ElasticEasingFunction::ElasticEasingFunction ( float  oscillations,
float  springiness 
)
inlineexplicit

Creates an ElasticEasingFunction with configurable oscillations and springiness.

Parameters
oscillationsNumber of oscillations over the range.
springinessStrength of the spring that controls the amplitude of the oscillations.
kanzi::ElasticEasingFunction::ElasticEasingFunction ( )
inline

Creates an ElasticEasingFunction with Oscillations and Springiness set to 3.0.

Member Function Documentation

float kanzi::ElasticEasingFunction::operator() ( float  time) const
inline

Computes value of the easing function for the given time.

Parameters
timeNormalized time.
Returns
Result of the easing function.

Member Data Documentation

float kanzi::ElasticEasingFunction::oscillations
float kanzi::ElasticEasingFunction::springiness

The documentation for this struct was generated from the following file: