30 #ifndef _CEGUITplInterpolators_h_
31 #define _CEGUITplInterpolators_h_
33 #include "CEGUI/Base.h"
34 #include "CEGUI/Interpolator.h"
35 #include "CEGUI/PropertyHelper.h"
52 virtual const String& getType()
const
85 typename Helper::return_type val1 = Helper::fromString(value1);
86 typename Helper::return_type val2 = Helper::fromString(value2);
88 const T result =
static_cast<const T
>(val1 * (1.0f - position) + val2 * (position));
90 return Helper::toString(result);
99 typename Helper::return_type bas = Helper::fromString(base);
100 typename Helper::return_type val1 = Helper::fromString(value1);
101 typename Helper::return_type val2 = Helper::fromString(value2);
103 const T result =
static_cast<const T
>(bas + (val1 * (1.0f - position) + val2 * (position)));
105 return Helper::toString(result);
114 typename Helper::return_type bas = Helper::fromString(base);
118 const float mul = val1 * (1.0f - position) + val2 * (position);
120 const T result =
static_cast<const T
>(bas * mul);
122 return Helper::toString(result);
151 typename Helper::return_type val1 = Helper::fromString(value1);
152 typename Helper::return_type val2 = Helper::fromString(value2);
154 typename Helper::return_type result = position < 0.5 ? val1 : val2;;
156 return Helper::toString(result);
166 typename Helper::return_type val1 = Helper::fromString(value1);
167 typename Helper::return_type val2 = Helper::fromString(value2);
169 typename Helper::return_type result = position < 0.5 ? val1 : val2;
171 return Helper::toString(result);
180 typename Helper::return_type bas = Helper::fromString(base);
187 return Helper::toString(bas);
218 typename Helper::return_type bas = Helper::fromString(base);
219 typename Helper::return_type val1 = Helper::fromString(value1);
220 typename Helper::return_type val2 = Helper::fromString(value2);
222 typename Helper::return_type result = bas + (position < 0.5 ? val1 : val2);
224 return Helper::toString(result);
230 #endif // end of guard _CEGUITplInterpolators_h_