1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _VTKViewer_ConvexTool_H
23 #define _VTKViewer_ConvexTool_H
25 #include "VTKViewer.h"
29 #include <vtkSystemIncludes.h>
31 class vtkUnstructuredGrid;
32 class vtkGeometryFilter;
42 class vtkOrderedTriangulator;
45 //----------------------------------------------------------------------------
46 class VTKVIEWER_EXPORT VTKViewer_Triangulator
49 VTKViewer_Triangulator();
51 ~VTKViewer_Triangulator();
54 Execute(vtkUnstructuredGrid *theInput,
55 vtkCellData* thInputCD,
59 const char* theCellsVisibility,
60 vtkPolyData *theOutput,
61 vtkCellData* theOutputCD,
63 std::vector<vtkIdType>& theVTK2ObjIds,
64 bool theIsCheckConvex);
70 vtkIdType *myPointIds;
76 InitPoints(vtkUnstructuredGrid *theInput,
85 GetFace(vtkIdType theFaceId) = 0;
91 GetPointId(vtkIdType thePointId);
97 GetCellNeighbors(vtkUnstructuredGrid *theInput,
100 vtkIdList* theCellIds);
103 GetConnectivity(vtkIdType thePntId);
107 //----------------------------------------------------------------------------
108 class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangulator
112 VTKViewer_OrderedTriangulator();
114 ~VTKViewer_OrderedTriangulator();
117 vtkOrderedTriangulator *myTriangulator;
118 vtkCellArray *myBoundaryTris;
119 vtkTriangle *myTriangle;
123 InitPoints(vtkUnstructuredGrid *theInput,
124 vtkIdType theCellId);
132 GetFace(vtkIdType theFaceId);
136 //----------------------------------------------------------------------------
137 class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangulator
141 VTKViewer_DelaunayTriangulator();
143 ~VTKViewer_DelaunayTriangulator();
146 vtkUnstructuredGrid* myUnstructuredGrid;
147 vtkGeometryFilter* myGeometryFilter;
148 vtkDelaunay3D* myDelaunay3D;
149 vtkPolyData* myPolyData;
153 InitPoints(vtkUnstructuredGrid *theInput,
154 vtkIdType theCellId);
162 GetFace(vtkIdType theFaceId);
166 #endif // _VTKViewer_ConvexTool_H