Tweeny
3
A Tweening library for modern C++
|
The tween class is the core class of tweeny. It controls the interpolation steps, easings and durations.
It should not be constructed manually but rather from tweeny::from
, to facilitate template argument deduction (and also to keep your code clean).
#include <tween.h>
Public Member Functions | |
tween () | |
Default constructor for a tween. More... | |
tween< T, Ts... > & | to (T t, Ts... vs) |
Adds a new currentPoint in this tweening. More... | |
template<typename... Fs> | |
tween< T, Ts... > & | via (Fs... fs) |
Specifies the easing function for the last added currentPoint. More... | |
template<typename... Fs> | |
tween< T, Ts... > & | via (int index, Fs... fs) |
Specifies the easing function for a specific currentPoint. More... | |
template<typename... Ds> | |
tween< T, Ts... > & | during (Ds... ds) |
Specifies the duration, typically in milliseconds, for the tweening of values in last currentPoint. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | step (int32_t dt, bool suppressCallbacks=false) |
Steps the animation by the designated delta amount. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | step (uint32_t dt, bool suppressCallbacks=false) |
Steps the animation by the designated delta amount. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | step (float dp, bool suppressCallbacks=false) |
Steps the animation by the designated percentage amount. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | seek (float p, bool suppressCallbacks=false) |
Seeks to a specified currentPoint in time based on the currentProgress. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | seek (int32_t d, bool suppressCallbacks=false) |
Seeks to a specified currentPoint in time. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | seek (uint32_t d, bool suppressCallbacks=false) |
Seeks to a specified currentPoint in time. More... | |
tween< T, Ts... > & | onStep (typename detail::tweentraits< T, Ts... >::callbackType callback) |
Adds a callback that will be called when stepping occurs, accepting both the tween and its values. More... | |
tween< T, Ts... > & | onStep (typename detail::tweentraits< T, Ts... >::noValuesCallbackType callback) |
Adds a callback that will be called when stepping occurs, accepting only the tween. More... | |
tween< T, Ts... > & | onStep (typename detail::tweentraits< T, Ts... >::noTweenCallbackType callback) |
Adds a callback that will be called when stepping occurs, accepting only the tween values. More... | |
tween< T, Ts... > & | onSeek (typename detail::tweentraits< T, Ts... >::callbackType callback) |
Adds a callback for that will be called when seeking occurs. More... | |
tween< T, Ts... > & | onSeek (typename detail::tweentraits< T, Ts... >::noTweenCallbackType callback) |
Adds a callback for that will be called when seeking occurs, accepting only the tween values. More... | |
tween< T, Ts... > & | onSeek (typename detail::tweentraits< T, Ts... >::noValuesCallbackType callback) |
Adds a callback for that will be called when seeking occurs, accepting only the tween. More... | |
uint32_t | duration () const |
Returns the total duration of this tween. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | peek () const |
Returns the current tween values. More... | |
const detail::tweentraits< T, Ts... >::valuesType | peek (float progress) const |
Calculates and returns the tween values at a given progress. More... | |
const detail::tweentraits< T, Ts... >::valuesType | peek (uint32_t time) const |
Calculates and return the tween values at a given time. More... | |
float | progress () const |
Returns the current currentProgress of the interpolation. More... | |
tween< T, Ts... > & | forward () |
Sets the direction of this tween forward. More... | |
tween< T, Ts... > & | backward () |
Sets the direction of this tween backward. More... | |
int | direction () const |
Returns the current direction of this tween. More... | |
const detail::tweentraits< T, Ts... >::valuesType & | jump (int32_t point, bool suppressCallbacks=false) |
Jumps to a specific tween currentPoint. More... | |
uint16_t | point () const |
Returns the current tween point. More... | |
Static Public Member Functions | |
static tween< T, Ts... > | from (T t, Ts... vs) |
Instantiates a tween from a starting currentPoint. More... | |