Kanzi  3.9.9
Kanzi Engine C++ 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

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.
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

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

float kanzi::BezierEasingFunction::fromValue
float kanzi::BezierEasingFunction::tangentFromTime
float kanzi::BezierEasingFunction::tangentFromValue
float kanzi::BezierEasingFunction::tangentToTime
float kanzi::BezierEasingFunction::tangentToValue
float kanzi::BezierEasingFunction::toValue

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