ui::util::Interpolator Class Reference

Inheritance diagram for ui::util::Interpolator:

Inheritance graph
[legend]
Collaboration diagram for ui::util::Interpolator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Interpolates values, bases on input. This can be used for animating objects. Original idea from the gamedev article by Richard Fine. http://www.gamedev.net/reference/articles/article2011.asp


Public Member Functions

 Interpolator ()
virtual ~Interpolator ()
void start ()
void stop ()
virtual void update (float deltaTime)=0
void addInterpolatee (Interpolatee *interpolatee)
void removeInterpolatee (Interpolatee *interpolatee)

Protected Member Functions

float clamp (float val, float min, float max)

Protected Attributes

bool isRunning
std::vector< Interpolatee * > interpolateeList


Constructor & Destructor Documentation

ui::util::Interpolator::Interpolator  ) 
 

Creates an interpolator that interpolates the given value.

ui::util::Interpolator::~Interpolator  )  [virtual]
 

Destructor.


Member Function Documentation

void ui::util::Interpolator::start  ) 
 

Start interpolating.

void ui::util::Interpolator::stop  ) 
 

Stop interpolating. This does not reset the timer.

virtual void ui::util::Interpolator::update float  deltaTime  )  [pure virtual]
 

Update the interpolator value.

Parameters:
deltaTime time to use.

Implemented in ui::util::TimeBasedInterpolator.

void ui::util::Interpolator::addInterpolatee Interpolatee interpolatee  ) 
 

Register an interpolatee to this interpolator, which will be interpolated according to the interpolator type.

void ui::util::Interpolator::removeInterpolatee Interpolatee interpolatee  ) 
 

Remove an interpolatee from this interpolator.

float ui::util::Interpolator::clamp float  val,
float  min,
float  max
[protected]
 

Clamp a value between min and max values.

Parameters:
val the value to clamp.
min the minimum value to clamp to.
max the maximum value to clamp to.


Member Data Documentation

bool ui::util::Interpolator::isRunning [protected]
 

Indicates if this Interpolator is running.


Generated on Mon Jun 20 19:42:05 2005 for UI by doxygen 1.3.1 using KingsTools