Performs linear interpolation of non-uniform samples. More...
#include <Nimble/Interpolation.hpp>
Public Types | |
| typedef std::pair< float, T > | Key |
| Type of key. | |
| typedef std::vector< Key > | Keys |
| Array of keys. | |
Public Member Functions | |
| void | addKey (float t, T value) |
| Add a key to the interpolation. More... | |
| void | clear () |
| Remove all key-points. | |
| T | interpolate (float t) const |
| Return the interpolated value at given position. More... | |
| const Keys & | keys () const |
| Gets a reference to the key-point list. | |
| LinearInterpolator () | |
| Constructs an empty interpolator. | |
Performs linear interpolation of non-uniform samples.
|
inline |
Add a key to the interpolation.
| t | position to add the value |
| value | value |
|
inline |
Return the interpolated value at given position.
| t | position to interpolate at |