V-ART
|
Hermite Spline interpolation. More...
#include <hermiteinterpolator.h>
Public Member Functions | |
HermiteInterpolator (float finalTime, float finalPosition) | |
virtual float | GetValue (float linearIndex, float initialPos, float range) const |
Evaluates a goal position for DOF interpolation. More... | |
virtual float | GetValue (float linearIndex) const |
virtual TypeID | GetID () const |
void | SetInitialPosition (float p) |
Sets initial position for interpolation. More... | |
void | AddControlPosition (float pos, float time) |
Adds a control position for interpolation. More... | |
Public Member Functions inherited from VART::Interpolator | |
Interpolator () | |
virtual | ~Interpolator () |
Protected Member Functions | |
int | WarpIndex (int i) const |
Warp index around valid vector indices. More... | |
Static Protected Member Functions | |
static float | Interpolate (float p1, float tg1, float p2, float tg2, float t) |
Hermite 1D interpolation. More... | |
Protected Attributes | |
std::vector< float > | positionVec |
A vector of positions to interpolate. More... | |
std::vector< float > | timeVec |
A vector of times for each position. More... | |
Additional Inherited Members | |
Public Types inherited from VART::Interpolator | |
enum | TypeID { LINEAR, EASE_IN_EASE_OUT, RANGED, HERMITE } |
Hermite Spline interpolation.
Interpolates positions using Hermite Curves. Hermite interpolators have a set of controls points that are use to control the interpolation values, i.e.: the curve passes thru control points. That given, hermite interpolators may not be a good thing to share among dof movers.
Definition at line 19 of file hermiteinterpolator.h.
VART::HermiteInterpolator::HermiteInterpolator | ( | float | finalTime, |
float | finalPosition | ||
) |
Definition at line 10 of file hermiteinterpolator.cpp.
void VART::HermiteInterpolator::AddControlPosition | ( | float | pos, |
float | time | ||
) |
Adds a control position for interpolation.
A control position is a value that should be given by interpolation at given time.
Definition at line 54 of file hermiteinterpolator.cpp.
|
inlinevirtual |
Implements VART::Interpolator.
Definition at line 26 of file hermiteinterpolator.h.
References VART::Interpolator::HERMITE.
|
inlinevirtual |
Evaluates a goal position for DOF interpolation.
linearIndex | [in] A number in range [0..1]. Usually related to a linear time function. |
initialPos | [in] A number in range [0..1]. DOF's initial movement position. |
range | [in] DOF's position range on movement. |
Implements VART::Interpolator.
Definition at line 23 of file hermiteinterpolator.h.
|
virtual |
Definition at line 21 of file hermiteinterpolator.cpp.
|
staticprotected |
Hermite 1D interpolation.
Definition at line 65 of file hermiteinterpolator.cpp.
|
inline |
Sets initial position for interpolation.
Definition at line 29 of file hermiteinterpolator.h.
References positionVec.
|
protected |
Warp index around valid vector indices.
Definition at line 78 of file hermiteinterpolator.cpp.
|
protected |
A vector of positions to interpolate.
Definition at line 44 of file hermiteinterpolator.h.
Referenced by SetInitialPosition().
|
protected |
A vector of times for each position.
The times are passed as joint movement normalized times, i.e.: values where 0 means the beginning of joint movement and 1 means end of joint movement. But are stored as dof movement normalized time, i.e.: values where 0 means the beginning of dof movment and 1 menas the end of dof movement.
Definition at line 52 of file hermiteinterpolator.h.