Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _VTKViewer_ConvexTool_H
00024 #define _VTKViewer_ConvexTool_H
00025
00026 #include "VTKViewer.h"
00027
00028 #include <vector>
00029
00030 #include <vtkSystemIncludes.h>
00031
00032 class vtkUnstructuredGrid;
00033 class vtkGeometryFilter;
00034 class vtkGenericCell;
00035 class vtkDelaunay3D;
00036 class vtkPolyData;
00037 class vtkCellData;
00038 class vtkPoints;
00039 class vtkIdList;
00040 class vtkCell;
00041 class vtkCellArray;
00042 class vtkTriangle;
00043 class vtkOrderedTriangulator;
00044
00045
00046
00047 class VTKVIEWER_EXPORT VTKViewer_Triangulator
00048 {
00049 public:
00050 VTKViewer_Triangulator();
00051
00052 ~VTKViewer_Triangulator();
00053
00054 bool
00055 Execute(vtkUnstructuredGrid *theInput,
00056 vtkCellData* thInputCD,
00057 vtkIdType theCellId,
00058 int theShowInside,
00059 int theAllVisible,
00060 const char* theCellsVisibility,
00061 vtkPolyData *theOutput,
00062 vtkCellData* theOutputCD,
00063 int theStoreMapping,
00064 std::vector<vtkIdType>& theVTK2ObjIds,
00065 bool theIsCheckConvex);
00066
00067 private:
00068 vtkIdList* myCellIds;
00069
00070 protected:
00071 vtkIdType *myPointIds;
00072 vtkIdList* myFaceIds;
00073 vtkPoints* myPoints;
00074
00075 virtual
00076 vtkPoints*
00077 InitPoints(vtkUnstructuredGrid *theInput,
00078 vtkIdType theCellId);
00079
00080 virtual
00081 vtkIdType
00082 GetNumFaces() = 0;
00083
00084 virtual
00085 vtkCell*
00086 GetFace(vtkIdType theFaceId) = 0;
00087
00088 vtkIdType
00089 GetNbOfPoints();
00090
00091 vtkIdType
00092 GetPointId(vtkIdType thePointId);
00093
00094 vtkFloatingPointType
00095 GetCellLength();
00096
00097 void
00098 GetCellNeighbors(vtkUnstructuredGrid *theInput,
00099 vtkIdType theCellId,
00100 vtkCell* theFace,
00101 vtkIdList* theCellIds);
00102
00103 vtkIdType
00104 GetConnectivity(vtkIdType thePntId);
00105 };
00106
00107
00108
00109 class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangulator
00110 {
00111 public:
00112
00113 VTKViewer_OrderedTriangulator();
00114
00115 ~VTKViewer_OrderedTriangulator();
00116
00117 protected:
00118 vtkOrderedTriangulator *myTriangulator;
00119 vtkCellArray *myBoundaryTris;
00120 vtkTriangle *myTriangle;
00121
00122 virtual
00123 vtkPoints*
00124 InitPoints(vtkUnstructuredGrid *theInput,
00125 vtkIdType theCellId);
00126
00127 virtual
00128 vtkIdType
00129 GetNumFaces();
00130
00131 virtual
00132 vtkCell*
00133 GetFace(vtkIdType theFaceId);
00134 };
00135
00136
00137
00138 class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangulator
00139 {
00140 public:
00141
00142 VTKViewer_DelaunayTriangulator();
00143
00144 ~VTKViewer_DelaunayTriangulator();
00145
00146 protected:
00147 vtkUnstructuredGrid* myUnstructuredGrid;
00148 vtkGeometryFilter* myGeometryFilter;
00149 vtkDelaunay3D* myDelaunay3D;
00150 vtkPolyData* myPolyData;
00151
00152 virtual
00153 vtkPoints*
00154 InitPoints(vtkUnstructuredGrid *theInput,
00155 vtkIdType theCellId);
00156
00157 virtual
00158 vtkIdType
00159 GetNumFaces();
00160
00161 virtual
00162 vtkCell*
00163 GetFace(vtkIdType theFaceId);
00164 };
00165
00166
00167 #endif // _VTKViewer_ConvexTool_H