37 template<
typename SampleType >
40 switch( interpolationType )
45 int it1 = (int)floor(t);
46 int it2 = ( it1 + 1 ) % samples.size();
48 if( t<0.5 )
return samples[it1];
49 else return samples[it2];
74 ERROR_OUT(
"unrecognized interpolation type" );
@ NEAREST
Definition interpolation.h:43
@ LINEAR
Definition interpolation.h:44
@ UNIFORM_CUBIC_B_SPLINE
Definition interpolation.h:46
@ CATMULL_ROM
Definition interpolation.h:45
static SampleType Sample(const std::vector< SampleType > &samples, double t, int interpolationType)
Definition interpolation.todo.inl:38
#define WARN_ONCE(...)
Definition exceptions.h:148
#define ERROR_OUT(...)
Definition exceptions.h:154