30 #ifndef __CLAW_TWEEN_SINGLE_TWEENER_HPP__
31 #define __CLAW_TWEEN_SINGLE_TWEENER_HPP__
36 #include <boost/function.hpp>
62 (
double init,
double end,
double duration, update_function callback,
65 (
double& val,
double end,
double duration, easing_function e );
75 bool do_is_finished()
const;
76 double do_update(
double dt );
92 update_function m_callback;
95 easing_function m_easing;
102 #endif // __CLAW_TWEEN_SINGLE_TWEENER_HPP__
void set_init(double v)
Set the initial value.
boost::function< void(double)> update_function
The type of the function called when the single_tweener is updated.
Common interface for all tweeners.
boost::function< double(double)> easing_function
The type of the function used to compute the new value.
A single_tweener makes a value to evolve through time from a initial value to an end value according ...
void set_duration(double v)
Set the total duration.
Common interface for all tweeners.
void set_callback(update_function f)
The function called when the single_tweener is updated.
void set_end(double v)
Set the final value.
single_tweener()
Default constructor.
This is the main namespace.
void set_easing(easing_function f)
The function used to compute the new value.
Easing functions for the tweener. Those functions do nothing.