Kanzi  3.9.4
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

◆ ElasticEasingFunction() [1/2]

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.

◆ ElasticEasingFunction() [2/2]

kanzi::ElasticEasingFunction::ElasticEasingFunction ( )
inline

Creates an ElasticEasingFunction with Oscillations and Springiness set to 3.0.

Member Function Documentation

◆ operator()()

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

◆ oscillations

float kanzi::ElasticEasingFunction::oscillations

◆ springiness

float kanzi::ElasticEasingFunction::springiness

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