CSplineSegmentFunction.h
Go to the documentation of this file.
1 #ifndef imath_CSplineSegmentFunction_included
2 #define imath_CSplineSegmentFunction_included
3 
4 
5 namespace imath
6 {
7 
8 
13 {
14 public:
15  // static methods
19  static double GetValueKernelAt(double alpha);
23  static double GetDerivativeKernelAt(double alpha);
24 };
25 
26 
27 // static protected inline methods
28 
29 inline double CSplineSegmentFunction::GetValueKernelAt(double alpha)
30 {
31  return (2 * alpha - 3) * alpha * alpha + 1;
32 }
33 
34 
36 {
37  double beta = 1 - alpha;
38  return alpha * beta * beta;
39 }
40 
41 
42 } // namespace imath
43 
44 
45 #endif // !imath_CSplineSegmentFunction_included
46 
47 
Helper class for calculation of splines of 3rd degree.
static double GetDerivativeKernelAt(double alpha)
Get kernel of derivative normalized to range [0, 1].
static double GetValueKernelAt(double alpha)
Get kernel of value normalized to range [0, 1].

© 2007-2017 Witold Gantzke and Kirill Lepskiy