Use bezier keyframes to animate property value along a bezier curve. More...
#include <kanzi/core.ui/animation/keyframe_animation.hpp>
Public Member Functions | |
BezierKeyframe () | |
Constructor. | |
BezierKeyframe (TValueType value, const Vector2 &p0, const Vector2 &p1) | |
Constructor. | |
Vector2 | getControlPoint0 () const |
Returns the first control point of the keyframe. | |
Vector2 | getControlPoint1 () const |
Returns the second control point of the keyframe. | |
TValueType | getValue (const TValueType ¤tValue, float normalizedTime) override |
Returns the value for the animated property at a given time. | |
void | setControlPoint0 (Vector2 controlPoint) |
Sets the first control point for a keyframe. | |
void | setControlPoint1 (Vector2 controlPoint) |
Sets the second control point for a keyframe. | |
void | setControlPoints (const Vector2 &p0, const Vector2 &p1) |
Sets control points for a keyframe. | |
Public Member Functions inherited from kanzi::KeyframeAnimation< TValueType >::Keyframe | |
TValueType | getKeyValue () const |
Returns the keyframe value of the animated property. | |
Keyframe () | |
Constructor. | |
Keyframe (TValueType value) | |
Constructor. | |
void | setKeyValue (const TValueType &keyValue) |
Sets the keyframe value for a keyframe. | |
virtual | ~Keyframe () |
Static Public Member Functions | |
static BezierKeyframePtr | create (TValueType value, const Vector2 &p0, const Vector2 &p1) |
Creates a bezier keyframe. | |
Use bezier keyframes to animate property value along a bezier curve.
A Bezier keyframe consists of two control points in addition to a keyframe value for the animated property. A control point is a pair of a floating point numbers stored in Vector2:
|
inlineexplicit |
Constructor.
|
inlineexplicit |
Constructor.
value | The keyframe value of the animated property. |
p0 | The first control point of the keyframe. |
p1 | The second control point of the keyframe. |
|
inlinestatic |
Creates a bezier keyframe.
value | The keyframe value of the animated property. |
p0 | The first control point of the keyframe. |
p1 | The second control point of the keyframe. |
|
inline |
Sets control points for a keyframe.
p0 | The first control point of the keyframe. |
p1 | The second control point of the keyframe. |
|
inline |
Returns the first control point of the keyframe.
|
inline |
Sets the first control point for a keyframe.
controlPoint | A control point that you want to use as the first control point of the keyframe. |
|
inline |
Returns the second control point of the keyframe.
|
inline |
Sets the second control point for a keyframe.
controlPoint | A control point that you want to use as the second control point of the keyframe. |
|
inlineoverridevirtual |
Returns the value for the animated property at a given time.
currentValue | The current value of the animated property. |
normalizedTime | The time at which you want to get the value of the animated property. 0.0 corresponds to the time of the previous keyframe. 1.0 corresponds to the time of this keyframe. |
Implements kanzi::KeyframeAnimation< TValueType >::Keyframe.