UtilVtk3DGeometriSelection.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __UTILVTK3DGEOMETRISELECTION__
00019 #define __UTILVTK3DGEOMETRISELECTION__
00020
00021 #include <vtkMarchingCubes.h>
00022
00023
00024
00025
00026
00027 class UtilVtk3DGeometriSelection
00028 {
00029 public:
00030 UtilVtk3DGeometriSelection();
00031 ~UtilVtk3DGeometriSelection();
00032 void SetDimentions(int w,int h,int d);
00033 void SetMarchingCube(vtkMarchingCubes *mCubes);
00034 bool FindCubePointsFromPoints( double* pO, double* pF, double* pickPoint, double* cameraPos );
00035 bool GetPointAndNormalIntersection( double* p, double* n, double* pO, double* pF );
00036 bool IntersectPlaneWithLine( double* p, double* x1, double* x2, double* x3, double* x4, double* x5 );
00037
00038 double DistanceMinPointToLine(double *p,double *pA, double *pB);
00039 void IntersectionPlaneAndLine(double *pResult,double *n,double *p,double *pA,double *pB);
00040
00041 protected:
00042 private:
00043 int _width;
00044 int _height;
00045 int _depth;
00046 vtkMarchingCubes *_mCubes;
00047 };
00048
00049
00050
00051 #endif //__UTILVTK3DGEOMETRISELECTION__