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 );
83 bool do_is_finished()
const;
84 double do_update(
double dt );
100 update_function m_callback;
103 easing_function m_easing;
110 #endif // __CLAW_TWEEN_SINGLE_TWEENER_HPP__ void set_init(double v)
Sets 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.
double get_value() const
Gets the current value of the tweener.
A single_tweener makes a value to evolve through time from a initial value to an end value according ...
void set_duration(double v)
Sets the total duration.
Common interface for all tweeners.
void set_callback(update_function f)
The function called when the single_tweener is updated.
double get_duration() const
Gets the total duration.
double get_init() const
Gets the initial value.
void set_end(double v)
Sets 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.
double get_end() const
Gets the final value.
Easing functions for the tweener. Those functions do nothing.