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 | |
static String | GetSerializableName () |
get the name of this class for serialization purposes More... | |
template<typename TIterator > | |
static T | Interpolate (TIterator Begin, TIterator End, Real Location) |
Get a value at a given location between two others. More... | |
static void | ProtoDeSerialize (const XML::Node &OneNode) |
This does not create or change the object it deserializes, but it does verify type info. More... | |
static void | ProtoSerialize (XML::Node &CurrentRoot) |
Append a node for with enough information to deserialize to the passed node. 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 261 of file interpolator.h.
typedef T Mezzanine::BezierInterpolator< T >::InterpolatableType |
The type this will interpolate.
Definition at line 266 of file interpolator.h.
|
inlinestatic |
get the name of this class for serialization purposes
Definition at line 359 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. |
Location | A value between 0.0 and 1.0 indicate what point on the bezier spline defined by Begin and End you want. |
Definition at line 290 of file interpolator.h.
|
inlinestatic |
This does not create or change the object it deserializes, but it does verify type info.
OneNode | The node to read serialized data from. |
Definition at line 336 of file interpolator.h.
|
inlinestatic |
Append a node for with enough information to deserialize to the passed node.
CurrentRoot | A node to act as the parent for the serialized version of this one. |
Definition at line 309 of file interpolator.h.