1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef _VTKViewer_ConvexTool_H
22 #define _VTKViewer_ConvexTool_H
24 #include "VTKViewer.h"
28 #include <vtkSystemIncludes.h>
30 class vtkUnstructuredGrid;
31 class vtkGeometryFilter;
41 class vtkOrderedTriangulator;
44 //----------------------------------------------------------------------------
45 class VTKVIEWER_EXPORT VTKViewer_Triangulator
48 VTKViewer_Triangulator();
50 ~VTKViewer_Triangulator();
53 Execute(vtkUnstructuredGrid *theInput,
54 vtkCellData* thInputCD,
58 const char* theCellsVisibility,
59 vtkPolyData *theOutput,
60 vtkCellData* theOutputCD,
62 std::vector<vtkIdType>& theVTK2ObjIds,
63 bool theIsCheckConvex);
69 vtkIdType *myPointIds;
75 InitPoints(vtkUnstructuredGrid *theInput,
84 GetFace(vtkIdType theFaceId) = 0;
90 GetPointId(vtkIdType thePointId);
96 GetCellNeighbors(vtkUnstructuredGrid *theInput,
99 vtkIdList* theCellIds);
102 GetConnectivity(vtkIdType thePntId);
106 //----------------------------------------------------------------------------
107 class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangulator
111 VTKViewer_OrderedTriangulator();
113 ~VTKViewer_OrderedTriangulator();
116 vtkOrderedTriangulator *myTriangulator;
117 vtkCellArray *myBoundaryTris;
118 vtkTriangle *myTriangle;
122 InitPoints(vtkUnstructuredGrid *theInput,
123 vtkIdType theCellId);
131 GetFace(vtkIdType theFaceId);
135 //----------------------------------------------------------------------------
136 class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangulator
140 VTKViewer_DelaunayTriangulator();
142 ~VTKViewer_DelaunayTriangulator();
145 vtkUnstructuredGrid* myUnstructuredGrid;
146 vtkGeometryFilter* myGeometryFilter;
147 vtkDelaunay3D* myDelaunay3D;
148 vtkPolyData* myPolyData;
152 InitPoints(vtkUnstructuredGrid *theInput,
153 vtkIdType theCellId);
161 GetFace(vtkIdType theFaceId);
165 #endif // _VTKViewer_ConvexTool_H