Skip to content

Transition

struct Transition

Create an animation transition function using * a one-dimensional cubic bezier curve.

This use the exact same algorithm as in CSS. The first and last control points of the cubic bezier curve are fixed to (0,0) and (1,1) respectively.

Variables

Name Description
m_controlPoints The control points.

Functions

Name Description
Transition Constructs a new Transition curve.
Transition Constructs a new Transition curve.
Ease Given an animation duration percentage (in the range [0, 1]), * it calculates the animation progression percentage from the configured curve.

Variable Details

m_controlPoints

BeizerCurveControlPoints m_controlPoints

The control points.

Function Details

Ease

[[nodiscard]] AmTime Ease(AmTime t) const

Given an animation duration percentage (in the range [0, 1]), * it calculates the animation progression percentage from the configured curve.

Parameter t
The animation duration percentage (in the range [0, 1]).
Return
The animation progress percentage (in the range [0, 1]).

Transition

Transition(AmReal32 x1, AmReal32 y1, AmReal32 x2, AmReal32 y2)

Constructs a new Transition curve.

Parameter x1
The x coordinate of the second control point.
Parameter y1
The y coordinate of the second control point.
Parameter x2
The x coordinate of the third control point.
Parameter y2
The y coordinate of the third control point.

Transition(const BeizerCurveControlPoints& controlPoints)

Constructs a new Transition curve.

Parameter controlPoints
The control points of the curve.