00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDataSetTriangleFilter.h,v $ 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 "vtkUnstructuredGridAlgorithm.h" 00043 00044 class vtkOrderedTriangulator; 00045 00046 class VTK_GRAPHICS_EXPORT vtkDataSetTriangleFilter : public vtkUnstructuredGridAlgorithm 00047 { 00048 public: 00049 static vtkDataSetTriangleFilter *New(); 00050 vtkTypeRevisionMacro(vtkDataSetTriangleFilter,vtkUnstructuredGridAlgorithm); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00053 protected: 00054 vtkDataSetTriangleFilter(); 00055 ~vtkDataSetTriangleFilter(); 00056 00057 // Usual data generation method 00058 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00059 00060 virtual int FillInputPortInformation(int port, vtkInformation *info); 00061 00062 // Used to triangulate 3D cells 00063 vtkOrderedTriangulator *Triangulator; 00064 00065 // Different execute methods depending on whether input is structured or not 00066 void StructuredExecute(vtkDataSet *, vtkUnstructuredGrid *); 00067 void UnstructuredExecute(vtkDataSet *, vtkUnstructuredGrid *); 00068 00069 private: 00070 vtkDataSetTriangleFilter(const vtkDataSetTriangleFilter&); // Not implemented. 00071 void operator=(const vtkDataSetTriangleFilter&); // Not implemented. 00072 }; 00073 00074 #endif 00075 00076