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. More... | |
BezierKeyframe (TValueType value, const Vector2 &p0, const Vector2 &p1) | |
Constructor. More... | |
Vector2 | getControlPoint0 () const |
Returns the first control point of the keyframe. More... | |
Vector2 | getControlPoint1 () const |
Returns the second control point of the keyframe. More... | |
TValueType | getValue (const TValueType ¤tValue, float normalizedTime) override |
Returns the value for the animated property at a given time. More... | |
void | setControlPoint0 (Vector2 controlPoint) |
Sets the first control point for a keyframe. More... | |
void | setControlPoint1 (Vector2 controlPoint) |
Sets the second control point for a keyframe. More... | |
void | setControlPoints (const Vector2 &p0, const Vector2 &p1) |
Sets control points for a keyframe. More... | |
Public Member Functions inherited from kanzi::KeyframeAnimation< TValueType >::Keyframe | |
TValueType | getKeyValue () const |
Returns the keyframe value of the animated property. More... | |
Keyframe () | |
Constructor. More... | |
Keyframe (TValueType value) | |
Constructor. More... | |
void | setKeyValue (const TValueType &keyValue) |
Sets the keyframe value for a keyframe. More... | |
virtual | ~Keyframe () |
Static Public Member Functions | |
static BezierKeyframePtr | create (TValueType value, const Vector2 &p0, const Vector2 &p1) |
Creates a bezier keyframe. More... | |
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.