Claw 1.7.0
Public Types | Public Member Functions
claw::tween::single_tweener Class Reference

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>

Inheritance diagram for claw::tween::single_tweener:
claw::tween::base_tweener

List of all members.

Public Types

typedef boost::function< void(double)> update_function
 The type of the function called when the single_tweener is updated.
typedef boost::function
< double(double)> 
easing_function
 The type of the function used to compute the new value.

Public Member Functions

 single_tweener ()
 Default constructor.
 single_tweener (double init, double end, double duration, update_function callback, easing_function e)
 Constructor.
 single_tweener (double &val, double end, double duration, easing_function e)
 Constructor.
void set_init (double v)
 Set the initial value.
void set_end (double v)
 Set the final value.
void set_duration (double v)
 Set the total duration.
void set_callback (update_function f)
 The function called when the single_tweener is updated.
void set_easing (easing_function f)
 The function used to compute the new value.

Detailed Description

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.


Constructor & Destructor Documentation

claw::tween::single_tweener::single_tweener ( double  init,
double  end,
double  duration,
update_function  callback,
easing_function  e 
)

Constructor.

Parameters:
initThe initial value.
endThe final value.
durationThe total duration.
callbackThe function called when the single_tweener is updated.
eThe function used to compute the new value.

Definition at line 54 of file single_tweener.cpp.

claw::tween::single_tweener::single_tweener ( double &  val,
double  end,
double  duration,
easing_function  e 
)

Constructor.

Parameters:
valThe value to tween (and to use as the The initial value).
endThe final value.
durationThe total duration.
eThe function used to compute the new value.

Definition at line 71 of file single_tweener.cpp.


Member Function Documentation

void claw::tween::single_tweener::set_callback ( update_function  f)

The function called when the single_tweener is updated.

Parameters:
fThe function.

Definition at line 112 of file single_tweener.cpp.

void claw::tween::single_tweener::set_duration ( double  v)

Set the total duration.

Parameters:
vThe value.

Definition at line 102 of file single_tweener.cpp.

void claw::tween::single_tweener::set_easing ( easing_function  f)

The function used to compute the new value.

Parameters:
fThe function.

Definition at line 122 of file single_tweener.cpp.

void claw::tween::single_tweener::set_end ( double  v)

Set the final value.

Parameters:
vThe value.

Definition at line 92 of file single_tweener.cpp.

void claw::tween::single_tweener::set_init ( double  v)

Set the initial value.

Parameters:
vThe value.

Definition at line 82 of file single_tweener.cpp.


The documentation for this class was generated from the following files: