V-ART
rangesineinterpolator.cpp
Go to the documentation of this file.
1 
5 #include <iostream>
7 #ifdef WIN32
8 #define _USE_MATH_DEFINES
9 #endif
10 #include <cmath>
11 
12 
13 using namespace std;
14 
16 {
17  minLimit = 0.0;
18  maxLimit = 1.0;
19 }
20 
22 {
23  minLimit = minLim;
24 }
25 
27 {
28  maxLimit = maxLim;
29 }
30 
31 //~ float VART::RangeSineInterpolator::GetValue(float n) const
32 //~ // virtual method
33 //~ {
34  //~ return (((sinf((n+1.5)*M_PI)+1)/2.0f)*(maxLimit-minLimit))+minLimit;
35 //~ }
36 
37 float VART::RangeSineInterpolator::GetValue(float linearIndex, float initialPos, float range) const
38 // virtual method
39 {
40  return ((((sinf((linearIndex+1.5)*M_PI)+1)/2.0f)*(maxLimit-minLimit))+minLimit)*range+initialPos;
41 }
virtual float GetValue(float linearIndex, float initialPos, float range) const
Evaluates a goal position for DOF interpolation.
void SetMaximunLimit(float maxLimit)
Header file for V-ART class "SineInterpolator".