V-ART
|
An interpolator for natural joint movement. More...
#include <naturalinterpolator.h>
Public Member Functions | |
NaturalInterpolator () | |
Creates an unitialized natural interpolator. More... | |
NaturalInterpolator (float offsetLevel, float overshootLevel) | |
virtual float | GetValue (float linearIndex, float initialValue, float range) const |
Evaluates a goal position for DOF interpolation. More... | |
void | SetOffset (float value) |
float | GetOffset () |
void | SetOvershoot (float value) |
float | GetOvershoot () |
void | SetNoise (float newNoiseAmplitude, float newNoiseWaveLenght) |
Public Member Functions inherited from VART::SineInterpolator | |
SineInterpolator () | |
virtual TypeID | GetID () const |
Public Member Functions inherited from VART::Interpolator | |
Interpolator () | |
virtual | ~Interpolator () |
Protected Attributes | |
float | offset |
how much to miss the target More... | |
float | overshoot |
how much to pass the target before correction More... | |
float | peakTime |
Overshoot time. More... | |
float | noiseAmplitude |
Noise amplitude (noise level) More... | |
float | noiseWaveLenght |
Noise wave length. More... | |
Additional Inherited Members | |
Public Types inherited from VART::Interpolator | |
enum | TypeID { LINEAR, EASE_IN_EASE_OUT, RANGED, HERMITE } |
An interpolator for natural joint movement.
Natural Interpolators provide an ease-in ease-out interpolator with noise, overshoot and offset.
Definition at line 18 of file naturalinterpolator.h.
VART::NaturalInterpolator::NaturalInterpolator | ( | ) |
Creates an unitialized natural interpolator.
Definition at line 24 of file naturalinterpolator.cpp.
VART::NaturalInterpolator::NaturalInterpolator | ( | float | offsetLevel, |
float | overshootLevel | ||
) |
Definition at line 28 of file naturalinterpolator.cpp.
|
inline |
Definition at line 26 of file naturalinterpolator.h.
References offset.
|
inline |
Definition at line 28 of file naturalinterpolator.h.
References overshoot.
|
virtual |
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. |
Reimplemented from VART::SineInterpolator.
Definition at line 67 of file naturalinterpolator.cpp.
void VART::NaturalInterpolator::SetNoise | ( | float | newNoiseAmplitude, |
float | newNoiseWaveLenght | ||
) |
Definition at line 35 of file naturalinterpolator.cpp.
|
inline |
Definition at line 25 of file naturalinterpolator.h.
References offset.
|
inline |
Definition at line 27 of file naturalinterpolator.h.
References overshoot.
|
protected |
Noise amplitude (noise level)
Definition at line 48 of file naturalinterpolator.h.
|
protected |
Noise wave length.
Time space between randoms in DOF's normalized time.
Definition at line 52 of file naturalinterpolator.h.
|
protected |
how much to miss the target
On a natural interpolator, values go from zero to 1+offset, creating positioning errors that may help creating natural movements.
Definition at line 37 of file naturalinterpolator.h.
Referenced by GetOffset(), and SetOffset().
|
protected |
how much to pass the target before correction
On a natural interpolator, values may pass the desired target and then fall back to the target position. This may help creating an effect associated with inertia.
Definition at line 42 of file naturalinterpolator.h.
Referenced by GetOvershoot(), and SetOvershoot().
|
protected |
Overshoot time.
Peak time is the (normalized) time of maximum overshoot error.
Definition at line 46 of file naturalinterpolator.h.