VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDataSetTriangleFilter.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00039 #ifndef vtkDataSetTriangleFilter_h 00040 #define vtkDataSetTriangleFilter_h 00041 00042 #include "vtkFiltersGeneralModule.h" // For export macro 00043 #include "vtkUnstructuredGridAlgorithm.h" 00044 00045 class vtkOrderedTriangulator; 00046 00047 class VTKFILTERSGENERAL_EXPORT vtkDataSetTriangleFilter : public vtkUnstructuredGridAlgorithm 00048 { 00049 public: 00050 static vtkDataSetTriangleFilter *New(); 00051 vtkTypeMacro(vtkDataSetTriangleFilter,vtkUnstructuredGridAlgorithm); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00057 vtkSetMacro(TetrahedraOnly, int); 00058 vtkGetMacro(TetrahedraOnly, int); 00059 vtkBooleanMacro(TetrahedraOnly, int); 00061 00062 protected: 00063 vtkDataSetTriangleFilter(); 00064 ~vtkDataSetTriangleFilter(); 00065 00066 // Usual data generation method 00067 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00068 00069 virtual int FillInputPortInformation(int port, vtkInformation *info); 00070 00071 // Used to triangulate 3D cells 00072 vtkOrderedTriangulator *Triangulator; 00073 00074 // Different execute methods depending on whether input is structured or not 00075 void StructuredExecute(vtkDataSet *, vtkUnstructuredGrid *); 00076 void UnstructuredExecute(vtkDataSet *, vtkUnstructuredGrid *); 00077 00078 int TetrahedraOnly; 00079 00080 private: 00081 vtkDataSetTriangleFilter(const vtkDataSetTriangleFilter&); // Not implemented. 00082 void operator=(const vtkDataSetTriangleFilter&); // Not implemented. 00083 }; 00084 00085 #endif 00086 00087