Time Manager
C4Time.h

class Interpolator

Encapsulates a general interpolator.
Definition

class Interpolator : public Completable<Interpolator>

Member Functions
Interpolator::GetValue Returns the current value of an interpolator.
Interpolator::SetValue Sets the current value of an interpolator.
Interpolator::GetMinValue Returns the minimum value of an interpolator.
Interpolator::SetMinValue Sets the minimum value of an interpolator.
Interpolator::GetMaxValue Returns the maximum value of an interpolator.
Interpolator::SetMaxValue Sets the maximum value of an interpolator.
Interpolator::SetRange Sets the minimum and maximum values of an interpolator.
Interpolator::GetRate Returns the rate at which an interpolator moves.
Interpolator::SetRate Sets the rate at which an interpolator moves.
Interpolator::GetMode Returns the current mode for an interpolator.
Interpolator::SetMode Sets the current mode for an interpolator.
Interpolator::SetRemapFunction Sets the remap function for an interpolator.
Interpolator::SetLoopProc Sets the loop callback procedure for an interpolator.
Interpolator::Set Sets the current value, rate, and mode for an interpolator.
Interpolator::UpdateValue Updates an interpolator.
Constructor

Interpolator();

Interpolator(float value, float rate = 0.0F, unsigned long mode = kInterpolatorStop, RemapProc *func = &Linear);

Parameters
value The initial value of the interpolator.
rate The rate at which the interpolated value changes. This is measured in value change per millisecond.
mode The initial interpolation mode. See below for possible values.
func A pointer to a value remap function.
Description


kInterpolatorStop The interpolator is stopped.
kInterpolatorForward The interpolator is moving forward. Only one of kInterpolatorForward and kInterpolatorBackward may be set.
kInterpolatorBackward The interpolator is moving backward. Only one of kInterpolatorForward and kInterpolatorBackward may be set.
kInterpolatorLoop The interpolator is loops in the same direction when it reaches the maximum or minimum value.
kInterpolatorOscillate The interpolator reverses direction when it reaches the maximum value. If kInterpolatorLoop is also set, the interpolator reverses direction when it reaches the minimum value as well.

typedef float RemapProc(float);

Base Classes
Completable<Interpolator> The completion procedure is called when an interpolator goes into the stopped state.