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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
21 #ifndef _VTKViewer_ConvexTool_H
22 #define _VTKViewer_ConvexTool_H
24 #include "VTKViewer.h"
28 #include <vtkSystemIncludes.h>
30 class vtkUnstructuredGrid;
31 class vtkGeometryFilter;
40 class VTKVIEWER_EXPORT VTKViewer_Triangulator
43 VTKViewer_Triangulator();
45 ~VTKViewer_Triangulator();
48 Execute(vtkUnstructuredGrid *theInput,
49 vtkCellData* thInputCD,
53 const char* theCellsVisibility,
54 vtkPolyData *theOutput,
55 vtkCellData* theOutputCD,
57 std::vector<vtkIdType>& theVTK2ObjIds,
58 bool theIsCheckConvex);
63 vtkUnstructuredGrid *myInput;
67 const char* myCellsVisibility;
79 GetPointId(vtkIdType thePointId) = 0;
91 GetFace(vtkIdType theFaceId) = 0;
95 GetCellNeighbors(vtkIdType theCellId,
97 vtkIdList* theCellIds) = 0;
101 GetConnectivity(vtkIdType thePntId) = 0;
105 class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangulator
109 VTKViewer_OrderedTriangulator();
111 ~VTKViewer_OrderedTriangulator();
114 vtkGenericCell *myCell;
125 GetPointId(vtkIdType thePointId);
137 GetFace(vtkIdType theFaceId);
141 GetCellNeighbors(vtkIdType theCellId,
143 vtkIdList* theCellIds);
147 GetConnectivity(vtkIdType thePntId);
151 class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangulator
155 VTKViewer_DelaunayTriangulator();
157 ~VTKViewer_DelaunayTriangulator();
160 vtkUnstructuredGrid* myUnstructuredGrid;
161 vtkGeometryFilter* myGeometryFilter;
162 vtkDelaunay3D* myDelaunay3D;
163 vtkPolyData* myPolyData;
164 vtkIdType *myPointIds;
165 vtkIdList* myFaceIds;
177 GetPointId(vtkIdType thePointId);
189 GetFace(vtkIdType theFaceId);
193 GetCellNeighbors(vtkIdType theCellId,
195 vtkIdList* theCellIds);
199 GetConnectivity(vtkIdType thePntId);
203 #endif // _VTKViewer_ConvexTool_H