AnimaL |
Tutorial |
Documentation |
00001 00002 #ifndef _HERMITE_FUNCTION 00003 #define _HERMITE_FUNCTION 00004 00005 #include "global.h" 00006 00007 00008 namespace animal 00009 { 00010 namespace octree 00011 { 00012 class HermiteFunction; 00013 } 00014 } 00015 00016 00017 00018 namespace animal 00019 { 00020 namespace octree 00021 { 00022 00023 class HermiteFunction 00024 { 00025 public: 00026 HermiteFunction( const FloatingPointType *coeffs, const unsigned int nCoeffs ); 00027 HermiteFunction( const HermiteFunction& hf ); 00028 HermiteFunction operator=( const HermiteFunction& hf ); 00029 ~HermiteFunction(); 00030 00031 FloatingPointType compute( FloatingPointType x ) const; 00032 00033 FloatingPointType computeDerivative( FloatingPointType x ) const; 00034 00035 protected: 00036 FloatingPointType *_coeffs; 00037 FloatingPointType *_derivativeCoeffs; 00038 00039 unsigned int _nCoeffs; 00040 00041 }; 00042 00043 } 00044 } 00045 00046 00047 00048 const animal::octree::FloatingPointType hermitianCoeffs[] = {1,0,-3,2}; 00049 const unsigned int nCoeffs = 4; 00050 // C2 continuity 00051 // With x0'' = 0 and x1'' = 0 00052 //static const FloatingPointType hermitianCoeffs[] = {1,0,0,-10,15,-6}; 00053 // With x0'' = 10 and x1'' = -10 00054 //static const FloatingPointType hermitianCoeffs[] = {0,0,5,-10,10,-4}; 00055 //static const unsigned int nCoeffs = 6; 00056 00057 //const FloatingPointType hermitianCoeffs[] = {1,-1}; 00058 //const unsigned int nCoeffs = 2; 00059 00060 static const animal::octree::HermiteFunction hf = animal::octree::HermiteFunction(hermitianCoeffs,nCoeffs); 00061 00062 00063 00064 00065 #endif 00066