48 if ( x < -0.5
f )
return 0.0f;
49 else if ( x < 0.5
f )
return 1.0f;
60 if ( x < -1.0
f )
return 0.0f;
61 else if ( x < 0.0
f )
return 1.0f +
x;
62 else if ( x < 1.0
f )
return 1.0f -
x;
75 if ( x < -1.5
f )
return 0.0f;
76 else if ( x < -0.5
f ) { t = x + 1.5f;
return 0.5f * t *
t; }
77 else if ( x < 0.5
f )
return 0.75f - x *
x;
78 else if ( x < 1.5
f ) { t = x - 1.5f;
return 0.5f * t *
t; }
91 if ( x < -2.0
f )
return 0.0f;
92 else if ( x < -1.0
f ) { t = 2.0f +
x;
return t * t * t / 6.0f; }
93 else if ( x < 0.0
f )
return ( 4.0
f + x * x * ( -6.0
f + x * -3.0
f ) ) / 6.0f;
94 else if ( x < 1.0
f )
return ( 4.0
f + x * x * ( -6.0
f + x * 3.0
f ) ) / 6.0f;
95 else if ( x < 2.0f ) { t = 2.0f -
x;
return t * t * t / 6.0f; }
106 if ( x < -2.0
f )
return 0.0f;
107 else if ( x < -1.0
f )
return 0.5f * ( 4.0f + x * ( 8.0f + x * ( 5.0f +
x ) ) );
108 else if ( x < 0.0
f )
return 0.5f * ( 2.0f + x * x * ( -5.0f + x * -3.0f ) );
109 else if ( x < 1.0
f )
return 0.5f * ( 2.0f + x * x * ( -5.0f + x * 3.0f ) );
110 else if ( x < 2.0
f )
return 0.5f * ( 4.0f + x * ( -8.0f + x * ( 5.0f -
x ) ) );
120 mP0 = ( 6.0f - 2.0f *
b ) / 6.0
f;
121 mP2 = ( -18.0f + 12.0f *
b + 6.0f *
c ) / 6.0
f;
122 mP3 = ( 12.0f - 9.0f *
b - 6.0f *
c ) / 6.0
f;
123 mQ0 = ( 8.0f *
b + 24.0f *
c ) / 6.0
f;
124 mQ1 = ( - 12.0f *
b - 48.0f *
c ) / 6.0
f;
125 mQ2 = ( 6.0f *
b + 30.0f *
c ) / 6.0
f;
126 mQ3 = ( -
b - 6.0f *
c ) / 6.0
f;
130 if ( x < -2.0
f )
return 0.;
131 else if ( x < -1.0
f )
return mQ0 - x * ( mQ1 - x * ( mQ2 - x * mQ3 ) );
132 else if ( x < 0.0
f )
return mP0 + x * x * ( mP2 - x * mP3 );
133 else if ( x < 1.0
f )
return mP0 + x * x * ( mP2 + x * mP3 );
134 else if ( x < 2.0
f )
return mQ0 + x * ( mQ1 + x * ( mQ2 + x * mQ3 ) );
139 float mQ0, mQ1, mQ2, mQ3;
149 float v( ( x == 0.0
f ) ? 1.0
f :
math<float>::sin( 3.14159265358979323846
f * x ) / ( 3.14159265358979323846
f * x ) );
166 #if ! defined( CINDER_COCOA_TOUCH )
172 #if (defined (CINDER_MSW) || defined( CINDER_WINRT ))
174 float v( ( x == 0.0
f ) ? ( 3.14159265358979323846
f / 4.0
f ) : static_cast<float>( _j1( 3.14159265358979323846
f * x ) ) / ( 2.0
f * x ) );
176 float v( ( x == 0.0
f ) ? ( 3.14159265358979323846
f / 4.0
f ) : static_cast<float>( j1( 3.14159265358979323846
f * x ) ) / ( 2.0
f * x ) );
FilterCubic(float aSupport=2.0f)
Definition: Filter.h:86
FilterTriangle(float aSupport=1.0f)
Definition: Filter.h:57
Definition: CinderMath.h:40
static T cos(T x)
Definition: CinderMath.h:46
virtual float operator()(float x) const
Definition: Filter.h:171
virtual float operator()(float x) const =0
FilterBase(float aSupport)
Definition: Filter.h:31
float mSupport
Definition: Filter.h:39
FilterSincBlackman(float aSupport=4.0f)
Definition: Filter.h:146
virtual ~FilterBase()
Definition: Filter.h:32
FilterMitchell(float aSupport=2.0f, float b=0.3333333333f, float c=0.3333333333f)
Definition: Filter.h:119
virtual float operator()(float x) const
Definition: Filter.h:129
virtual float operator()(float x) const
Definition: Filter.h:161
void setSupport(float aSupport)
Definition: Filter.h:35
FilterBesselBlackman(float aSupport=3.2383f)
Definition: Filter.h:169
virtual float operator()(float x) const
Definition: Filter.h:105
FilterGaussian(float aSupport=1.25f)
Definition: Filter.h:159
GLenum GLint x
Definition: GLee.h:987
virtual float operator()(float x) const
Definition: Filter.h:72
const GLdouble * v
Definition: GLee.h:1384
GLboolean GLboolean GLboolean b
Definition: GLee.h:2964
float getSupport() const
Definition: Filter.h:34
FilterCatmullRom(float aSupport=2.0f)
Definition: Filter.h:103
const GLubyte * c
Definition: GLee.h:8491
FilterBox(float aSupport=0.5f)
Definition: Filter.h:45
virtual float operator()(float x) const
Definition: Filter.h:47
virtual float operator()(float x) const
Definition: Filter.h:59
FilterQuadratic(float aSupport=1.5f)
Definition: Filter.h:70
GLdouble GLdouble t
Definition: GLee.h:1426
GLclampf f
Definition: GLee.h:15307
virtual float operator()(float x) const
Definition: Filter.h:148
virtual float operator()(float x) const
Definition: Filter.h:88