Interface for use with the ValueAnimator::setEvaluator(TypeEvaluator) function.
More...
#include <math.h>
#include <helper/obj-ref-impl.hpp>
#include <helper/SColor.h>
Go to the source code of this file.
|
template<typename T> |
SNSBEGIN T | Evaluate (float fraction, const T &start, const T &end) |
| Template function for linearly interpolating values.
|
|
template<> |
RECT | Evaluate (float fraction, const RECT &mStart, const RECT &mEnd) |
| Template specialization for linearly interpolating RECT values.
|
|
template<> |
POINT | Evaluate (float fraction, const POINT &mStart, const POINT &mEnd) |
| Template specialization for linearly interpolating POINT values.
|
|
template<> |
SIZE | Evaluate (float fraction, const SIZE &mStart, const SIZE &mEnd) |
| Template specialization for linearly interpolating SIZE values.
|
|
Interface for use with the ValueAnimator::setEvaluator(TypeEvaluator) function.
Evaluators allow developers to create animations on arbitrary property types, by allowing them to supply custom evaluators for types that are not automatically understood and used by the animation system.
- See also
- ValueAnimator::setEvaluator(TypeEvaluator)
Definition in file TypeEvaluator.h.
◆ Evaluate() [1/4]
template<>
POINT Evaluate |
( |
float | fraction, |
|
|
const POINT & | mStart, |
|
|
const POINT & | mEnd ) |
|
inline |
Template specialization for linearly interpolating POINT values.
- Parameters
-
fraction | The fraction from the starting to the ending values. |
mStart | The starting POINT value. |
mEnd | The ending POINT value. |
- Returns
- The linearly interpolated POINT value.
Definition at line 281 of file TypeEvaluator.h.
◆ Evaluate() [2/4]
template<>
RECT Evaluate |
( |
float | fraction, |
|
|
const RECT & | mStart, |
|
|
const RECT & | mEnd ) |
|
inline |
Template specialization for linearly interpolating RECT values.
- Parameters
-
fraction | The fraction from the starting to the ending values. |
mStart | The starting RECT value. |
mEnd | The ending RECT value. |
- Returns
- The linearly interpolated RECT value.
Definition at line 263 of file TypeEvaluator.h.
◆ Evaluate() [3/4]
template<>
SIZE Evaluate |
( |
float | fraction, |
|
|
const SIZE & | mStart, |
|
|
const SIZE & | mEnd ) |
|
inline |
Template specialization for linearly interpolating SIZE values.
- Parameters
-
fraction | The fraction from the starting to the ending values. |
mStart | The starting SIZE value. |
mEnd | The ending SIZE value. |
- Returns
- The linearly interpolated SIZE value.
Definition at line 297 of file TypeEvaluator.h.
◆ Evaluate() [4/4]
template<typename T>
SNSBEGIN T Evaluate |
( |
float | fraction, |
|
|
const T & | start, |
|
|
const T & | end ) |
|
inline |
Template function for linearly interpolating values.
- Template Parameters
-
T | The type of the values to interpolate. |
- Parameters
-
fraction | The fraction from the starting to the ending values. |
start | The starting value. |
end | The ending value. |
- Returns
- The linearly interpolated value.
Definition at line 29 of file TypeEvaluator.h.