A simple functor for interpolating data points in a simple way. More...
#include <interpolator.h>
Public Types | |
typedef T | InterpolatableType |
The type this will interpolate. More... | |
typedef std::vector < InterpolatableType > | Storage |
The storage to use with thison tracks. | |
Static Public Member Functions | |
template<typename TIterator > | |
static T | Interpolate (TIterator Begin, TIterator End, Real Location) |
Get a value at a given location between two others. More... | |
A simple functor for interpolating data points in a simple way.
This interpolator provides different guarantees different from the linear one:
Definition at line 194 of file interpolator.h.
typedef T Mezzanine::BezierInterpolator< T >::InterpolatableType |
The type this will interpolate.
Definition at line 199 of file interpolator.h.
|
inlinestatic |
Get a value at a given location between two others.
This uses Linear interpolation recursively to produce a single curve following Bézier's curve algorithm. For example if interpolating the location 0.5 on a set of 3 data points A,B,C and therefor 2 data segments AB and BC, you can imagine this as getting the point halfway down AB and the point halfway down down BC. Then this will get return the halfway between each of those points. This produces smooth curves but could perform slowly. For more details see the wikiedia pages on Bézier curves: http://en.wikipedia.org/wiki/Bézier_curve or http://en.wikipedia.org/wiki/B%C3%A9zier_curve
Begin | An Iterator to the begining of the range of the instances of the type to be Interpolated |
End | The end (not one past the end) of the range that Begin started. |
A | value between 0.0 and 1.0 indicate what point on the beziear spline defined by Begin and End you want. |
Definition at line 217 of file interpolator.h.