claw::tween::tweener Class Reference

A tweener makes a value to evolve through time from a initial value to an end value according to a given function. More...

`#include <tweener.hpp>`

## Public Types

typedef boost::function< void()> | finish_callback
| The type of the function called to notify the end of the tweener.

## Public Member Functions

| tweener ()
| Default constructor.
| tweener (const tweener &that)
| Copy constructor. More...
| tweener (const base_tweener &that)
| Constructor from a base_tweener. More...
| ~tweener ()
| Destructor.
tweener & | operator= (const tweener &that)
| Assignment operator. More...
void | swap (tweener &that) throw ()
| Swap this instance with a given instance. More...
bool | is_finished () const
| Tell if the tweener has reached his total duration.
double | update (double dt)
| Update the tweener of a given amount of time. More...
void | on_finished (finish_callback f)
| Execute the callbacks notifying about the finish of the tweener.

## Detailed Description

A 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
  tweeners

Definition at line 48 of file tweener.hpp.

## Constructor & Destructor Documentation

## tweener() [1/2]

claw::tween::tweener::tweener | ( | const tweener & | that | ) |

Copy constructor.

Parameters

  that | The instance to copy from.

Definition at line 48 of file tweener.cpp.

## tweener() [2/2]

claw::tween::tweener::tweener | ( | const base_tweener & | that | ) |

Constructor from a base_tweener.

Parameters

  that | The instance to use for the implementation.

Definition at line 59 of file tweener.cpp.

## Member Function Documentation

## operator=()

claw::tween::tweener & claw::tween::tweener::operator= | ( | const tweener & | that | ) |

Assignment operator.

Parameters

  that | The instance to copy from.

Definition at line 79 of file tweener.cpp.

References swap().

## swap()

void claw::tween::tweener::swap | ( | tweener & | that | ) |
throw | ( |
| ) |  |

Swap this instance with a given instance.

Parameters

  that | The instance to swap with.

Definition at line 91 of file tweener.cpp.

Referenced by operator=(), and std::swap().

## update()

double claw::tween::tweener::update | ( | double | dt | ) |

Update the tweener of a given amount of time.

Parameters

  dt | The duration of the update in time units since the last call.

Definition at line 113 of file tweener.cpp.

References claw::tween::base_tweener::update().

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

- tween/tweener.hpp
- code/tween/tweener.cpp