V-ART
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
source
sineinterpolator.cpp
Go to the documentation of this file.
1
5
#include "
vart/sineinterpolator.h
"
6
7
#ifdef WIN32
8
#define _USE_MATH_DEFINES
9
#endif
10
11
#include <cmath>
12
13
//#include <iostream>
14
//using namespace std;
15
16
VART::SineInterpolator::SineInterpolator
()
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
}
sineinterpolator.h
Header file for V-ART class "SineInterpolator".
VART::SineInterpolator::SineInterpolator
SineInterpolator()
Definition:
sineinterpolator.cpp:16
VART::SineInterpolator::GetValue
virtual float GetValue(float linearIndex, float initialPos, float range) const
Evaluates a goal position for DOF interpolation.
Definition:
sineinterpolator.cpp:26
Generated on Tue May 6 2014 15:09:54 for V-ART by
1.8.6