]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/UtilVtk3DGeometriSelection.h
creaMaracasVisu Library
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / UtilVtk3DGeometriSelection.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: UtilVtk3DGeometriSelection.h,v $
5   Language:  C++
6   Date:      $Date: 2008/10/31 16:32:41 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
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.
15
16 =========================================================================*/
17
18 #ifndef __UTILVTK3DGEOMETRISELECTION__
19 #define __UTILVTK3DGEOMETRISELECTION__
20
21 #include <vtkMarchingCubes.h>
22
23 //------------------------------------------------------------------
24 //------------------------------------------------------------------
25 //------------------------------------------------------------------
26
27 class UtilVtk3DGeometriSelection
28 {
29 public:
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 );
37
38         double  DistanceMinPointToLine(double *p,double *pA, double *pB);
39         void    IntersectionPlaneAndLine(double *pResult,double *n,double *p,double *pA,double *pB);
40
41 protected:
42 private:
43         int                                     _width;
44         int                                     _height;
45         int                                     _depth;
46         vtkMarchingCubes        *_mCubes;
47 };
48
49
50
51 #endif //__UTILVTK3DGEOMETRISELECTION__