1 /*=========================================================================
4 Module: $RCSfile: UtilVtk3DGeometriSelection.h,v $
6 Date: $Date: 2009/05/14 13:54:34 $
7 Version: $Revision: 1.2 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
18 #ifndef __UTILVTK3DGEOMETRISELECTION__
19 #define __UTILVTK3DGEOMETRISELECTION__
21 #include <vtkMarchingCubes.h>
23 //------------------------------------------------------------------
24 //------------------------------------------------------------------
25 //------------------------------------------------------------------
27 class UtilVtk3DGeometriSelection
30 UtilVtk3DGeometriSelection();
31 ~UtilVtk3DGeometriSelection();
32 void SetDimentions(int w,int h,int d);
33 void SetMarchingCube(vtkMarchingCubes *mCubes);
34 bool FindCubePointsFromPoints( double* pO, double* pF, double* pickPoint, double* cameraPos );
35 bool GetPointAndNormalIntersection( double* p, double* n, double* pO, double* pF );
36 bool IntersectPlaneWithLine( double* p, double* x1, double* x2, double* x3, double* x4, double* x5 );
38 double DistanceMinPointToLine(double *p,double *pA, double *pB);
39 void IntersectionPlaneAndLine(double *pResult,double *n,double *p,double *pA,double *pB);
46 vtkMarchingCubes *_mCubes;
51 #endif //__UTILVTK3DGEOMETRISELECTION__