A single_tweener makes a value to evolve through time from a initial value to an end value according to a given function.
More...
#include <single_tweener.hpp>
|
typedef std::function< void(double)> | update_function |
| The type of the function called when the single_tweener is updated.
|
|
typedef std::function< double(double)> | easing_function |
| The type of the function used to compute the new value.
|
|
typedef std::function< void()> | finish_callback |
| The type of the function called to notify the end of the tweener.
|
|
A single_tweener makes a value to evolve through time from a initial value to an end value according to a given function.
- Author
- Julien Jorge
- See also
- C++ Tweeners
Definition at line 48 of file single_tweener.hpp.
◆ single_tweener() [1/2]
Constructor.
- Parameters
-
init | The initial value. |
end | The final value. |
duration | The total duration. |
callback | The function called when the single_tweener is updated. |
e | The function used to compute the new value. |
Definition at line 49 of file single_tweener.cpp.
◆ single_tweener() [2/2]
claw::tween::single_tweener::single_tweener |
( |
double & |
val, |
|
|
double |
end, |
|
|
double |
duration, |
|
|
easing_function |
e |
|
) |
| |
Constructor.
- Parameters
-
val | The value to tween (and to use as the The initial value). |
end | The final value. |
duration | The total duration. |
e | The function used to compute the new value. |
Definition at line 68 of file single_tweener.cpp.
◆ set_callback()
◆ set_duration()
void claw::tween::single_tweener::set_duration |
( |
double |
v | ) |
|
◆ set_easing()
The function used to compute the new value.
- Parameters
-
Definition at line 146 of file single_tweener.cpp.
◆ set_end()
void claw::tween::single_tweener::set_end |
( |
double |
v | ) |
|
◆ set_init()
void claw::tween::single_tweener::set_init |
( |
double |
v | ) |
|
The documentation for this class was generated from the following files: