Crazy Eddie's GUI System  0.8.4
CEGUI::TplLinearInterpolator< T > Class Template Reference

Generic linear interpolator class. More...

+ Inheritance diagram for CEGUI::TplLinearInterpolator< T >:
+ Collaboration diagram for CEGUI::TplLinearInterpolator< T >:

List of all members.

Public Types

typedef PropertyHelper< T > Helper

Public Member Functions

 TplLinearInterpolator (const String &type)
virtual ~TplLinearInterpolator ()
 destructor
virtual String interpolateAbsolute (const String &value1, const String &value2, float position)
virtual String interpolateRelative (const String &base, const String &value1, const String &value2, float position)
virtual String interpolateRelativeMultiply (const String &base, const String &value1, const String &value2, float position)

Detailed Description

template<typename T>
class CEGUI::TplLinearInterpolator< T >

Generic linear interpolator class.

This class works on a simple formula: result = val1 * (1.0f - position) + val2 * (position); You can only use it on types that have operator*(float) and operator+(T) overloaded!


Member Function Documentation

template<typename T >
virtual String CEGUI::TplLinearInterpolator< T >::interpolateAbsolute ( const String value1,
const String value2,
float  position 
) [inline, virtual]

this is used when Affector is set to apply values in absolute mode (application method == AM_Absolute)

Implements CEGUI::Interpolator.

template<typename T >
virtual String CEGUI::TplLinearInterpolator< T >::interpolateRelative ( const String base,
const String value1,
const String value2,
float  position 
) [inline, virtual]

this is used when Affector is set to apply values in relative mode (application method == AM_Relative)

Implements CEGUI::Interpolator.

template<typename T >
virtual String CEGUI::TplLinearInterpolator< T >::interpolateRelativeMultiply ( const String base,
const String value1,
const String value2,
float  position 
) [inline, virtual]

this is used when Affector is set to apply values in relative multiply mode (application method == AM_RelativeMultiply)

Implements CEGUI::Interpolator.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends