V-ART
sineinterpolator.cpp
Go to the documentation of this file.
1 
6 
7 #ifdef WIN32
8 #define _USE_MATH_DEFINES
9 #endif
10 
11 #include <cmath>
12 
13 //#include <iostream>
14 //using namespace std;
15 
17 {
18 }
19 
20 //~ float VART::SineInterpolator::GetValue(float n) const
21 //~ // virtual method
22 //~ {
23  //~ return (sinf((n+1.5)*M_PI)+1)/2.0f;
24 //~ }
25 
26 float VART::SineInterpolator::GetValue(float linearIndex, float initialPos, float range) const
27 // virtual method
28 {
29  return (sinf((linearIndex+1.5)*3.1415926535897932384626433832795)+1) * range/2.0f + initialPos;
30 }
Header file for V-ART class "SineInterpolator".
virtual float GetValue(float linearIndex, float initialPos, float range) const
Evaluates a goal position for DOF interpolation.