MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00006 00011 //---------------------------------------------------------------------------------- 00012 00013 #ifndef __CSOSplineLinearInterpolation_H 00014 #define __CSOSplineLinearInterpolation_H 00015 00016 00017 00018 #include "MLCSOIncludes.h" 00019 #include <CSOBase/CSO.h> 00020 00021 00022 ML_START_NAMESPACE 00023 00025 00027 enum SplineModes { 00028 SPLINE_MODE_INTERPOLATION = 0, 00029 SPLINE_MODE_APPROXIMATION = 1 00030 }; 00031 00033 00037 namespace CSOGeneratePathPoints 00038 { 00040 MLCSO_EXPORT void fillAllPathPointsLinear(CSO* cso, unsigned int steps=1); 00042 MLCSO_EXPORT void fillAllPathPointsSpline(CSO* cso, unsigned int steps=1, int splineMode=0); 00044 MLCSO_EXPORT void fillAllPathPointsSplineInterpolation(CSO* cso, unsigned int steps=1); 00046 MLCSO_EXPORT void fillAllPathPointsSplineApproximation(CSO* cso, unsigned int steps=1); 00047 00049 MLCSO_EXPORT void fillPathPointsLinear(CSO* cso, CSOPathPoints* pPoints, unsigned int steps=1); 00051 MLCSO_EXPORT void fillPathPointsHermite(CSO* cso, CSOPathPoints* pPoints, const Vector3& tangentTail, const Vector3& tangentHead, unsigned int steps=1); 00053 MLCSO_EXPORT void fillPathPointsSpline(CSO* cso, CSOPathPoints* pPoints, unsigned int steps=1, int splineMode=0); 00054 00056 MLCSO_EXPORT void fillPathPointsSplineInterpolation(CSO* cso, CSOPathPoints* pPoints, unsigned int steps=1); 00058 MLCSO_EXPORT void fillPathPointsSplineApproximation(CSO* cso, CSOPathPoints* pPoints, unsigned int steps=1); 00059 00061 MLCSO_EXPORT void fillPathPointsSplineInterpolation(CSO* cso, CSOPathPoints* pPoints, const std::vector<Vector3>&positions, unsigned int steps=1); 00063 MLCSO_EXPORT void fillPathPointsSplineApproximation(CSO* cso, CSOPathPoints* pPoints, const std::vector<Vector3>&positions, unsigned int steps=1); 00065 MLCSO_EXPORT void fillPathPointsSpline(CSO* cso, CSOPathPoints* pPoints, const std::vector<Vector3>&positions, unsigned int steps=1, int splineMode=0); 00066 00067 00069 double _catmullRomBasisFunc(int i, double t); 00071 void _computeSingleCatmullRomPoint(int i, double t, Vector3& pos, double* xCoords, double* yCoords, double* zCoords); 00072 00074 double _B_SplineBasisFunc(int i, double t); 00076 void _computeSingleB_SplinePoint(int i, double t, Vector3& pos, double* xCoords, double* yCoords, double* zCoords); 00077 }; 00078 00080 00081 00082 ML_END_NAMESPACE 00083 00084 00085 00086 #endif // __CSOSplineLinearInterpolation_H 00087