Kanzi  3.9.4
Kanzi Engine API
kanzi::BezierEasingFunction Struct Reference

Changes the value according to a Bezier curve. More...

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

Public Member Functions

 BezierEasingFunction (float fromValue, float tangentFromTime, float tangentFromValue, float tangentToTime, float tangentToValue, float toValue)
 Constructs a BezierEasingFunction with the given parameters. More...
 
 BezierEasingFunction ()
 Constructs a default BezierEasingFunction. More...
 
float operator() (float time) const
 Computes the value of a Bezier easing function for the given time. More...
 

Public Attributes

float fromValue
 
float tangentFromTime
 
float tangentFromValue
 
float tangentToTime
 
float tangentToValue
 
float toValue
 

Detailed Description

Changes the value according to a Bezier curve.

Constructor & Destructor Documentation

◆ BezierEasingFunction() [1/2]

kanzi::BezierEasingFunction::BezierEasingFunction ( float  fromValue,
float  tangentFromTime,
float  tangentFromValue,
float  tangentToTime,
float  tangentToValue,
float  toValue 
)
inlineexplicit

Constructs a BezierEasingFunction with the given parameters.

Parameters
fromValueStarting point of the Bezier curve.
tangentFromTimeTime component of the first control point.
tangentFromValueValue component of the first control point.
tangentToTimeTime component of the second control point.
tangentToValueValue component of the second control point.
toValueEnding point of the Bezier curve.

◆ BezierEasingFunction() [2/2]

kanzi::BezierEasingFunction::BezierEasingFunction ( )
inlineexplicit

Constructs a default BezierEasingFunction.

The default curve is from 0.0 - 1.0, with control points of (0.5, 0.0) and (0.5, 1.0).

Member Function Documentation

◆ operator()()

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

Computes the value of a Bezier easing function for the given time.

Parameters
timeNormalized time.
Returns
Result of the easing function.

Member Data Documentation

◆ fromValue

float kanzi::BezierEasingFunction::fromValue

◆ tangentFromTime

float kanzi::BezierEasingFunction::tangentFromTime

◆ tangentFromValue

float kanzi::BezierEasingFunction::tangentFromValue

◆ tangentToTime

float kanzi::BezierEasingFunction::tangentToTime

◆ tangentToValue

float kanzi::BezierEasingFunction::tangentToValue

◆ toValue

float kanzi::BezierEasingFunction::toValue

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