/*========================================================================= Program: wxMaracas Module: $RCSfile: UtilVtk3DGeometriSelection.h,v $ Language: C++ Date: $Date: 2009/05/14 13:54:34 $ Version: $Revision: 1.2 $ Copyright: (c) 2002, 2003 License: This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #ifndef __UTILVTK3DGEOMETRISELECTION__ #define __UTILVTK3DGEOMETRISELECTION__ #include //------------------------------------------------------------------ //------------------------------------------------------------------ //------------------------------------------------------------------ class UtilVtk3DGeometriSelection { public: UtilVtk3DGeometriSelection(); ~UtilVtk3DGeometriSelection(); void SetDimentions(int w,int h,int d); void SetMarchingCube(vtkMarchingCubes *mCubes); bool FindCubePointsFromPoints( double* pO, double* pF, double* pickPoint, double* cameraPos ); bool GetPointAndNormalIntersection( double* p, double* n, double* pO, double* pF ); bool IntersectPlaneWithLine( double* p, double* x1, double* x2, double* x3, double* x4, double* x5 ); double DistanceMinPointToLine(double *p,double *pA, double *pB); void IntersectionPlaneAndLine(double *pResult,double *n,double *p,double *pA,double *pB); protected: private: int _width; int _height; int _depth; vtkMarchingCubes *_mCubes; }; #endif //__UTILVTK3DGEOMETRISELECTION__