29 #ifndef _CEGUITplInterpolators_h_
30 #define _CEGUITplInterpolators_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/Interpolator.h"
34 #include "CEGUI/PropertyHelper.h"
51 virtual const String& getType()
const
84 typename Helper::return_type val1 = Helper::fromString(value1);
85 typename Helper::return_type val2 = Helper::fromString(value2);
87 const T result =
static_cast<const T
>(val1 * (1.0f - position) + val2 * (position));
89 return Helper::toString(result);
98 typename Helper::return_type bas = Helper::fromString(base);
99 typename Helper::return_type val1 = Helper::fromString(value1);
100 typename Helper::return_type val2 = Helper::fromString(value2);
102 const T result =
static_cast<const T
>(bas + (val1 * (1.0f - position) + val2 * (position)));
104 return Helper::toString(result);
113 typename Helper::return_type bas = Helper::fromString(base);
117 const float mul = val1 * (1.0f - position) + val2 * (position);
119 const T result =
static_cast<const T
>(bas * mul);
121 return Helper::toString(result);
150 typename Helper::return_type val1 = Helper::fromString(value1);
151 typename Helper::return_type val2 = Helper::fromString(value2);
153 typename Helper::return_type result = position < 0.5 ? val1 : val2;;
155 return Helper::toString(result);
165 typename Helper::return_type val1 = Helper::fromString(value1);
166 typename Helper::return_type val2 = Helper::fromString(value2);
168 typename Helper::return_type result = position < 0.5 ? val1 : val2;
170 return Helper::toString(result);
179 typename Helper::return_type bas = Helper::fromString(base);
186 return Helper::toString(bas);
217 typename Helper::return_type bas = Helper::fromString(base);
218 typename Helper::return_type val1 = Helper::fromString(value1);
219 typename Helper::return_type val2 = Helper::fromString(value2);
221 typename Helper::return_type result = bas + (position < 0.5 ? val1 : val2);
223 return Helper::toString(result);
229 #endif // end of guard _CEGUITplInterpolators_h_