VTK
dox/Graphics/vtkDataSetTriangleFilter.h
Go to the documentation of this file.
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 "vtkUnstructuredGridAlgorithm.h"
00043 
00044 class vtkOrderedTriangulator;
00045 
00046 class VTK_GRAPHICS_EXPORT vtkDataSetTriangleFilter : public vtkUnstructuredGridAlgorithm
00047 {
00048 public:
00049   static vtkDataSetTriangleFilter *New();
00050   vtkTypeMacro(vtkDataSetTriangleFilter,vtkUnstructuredGridAlgorithm);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00056   vtkSetMacro(TetrahedraOnly, int);
00057   vtkGetMacro(TetrahedraOnly, int);
00058   vtkBooleanMacro(TetrahedraOnly, int);
00060 
00061 protected:
00062   vtkDataSetTriangleFilter();
00063   ~vtkDataSetTriangleFilter();
00064 
00065   // Usual data generation method
00066   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00067 
00068   virtual int FillInputPortInformation(int port, vtkInformation *info);
00069 
00070   // Used to triangulate 3D cells
00071   vtkOrderedTriangulator *Triangulator;
00072 
00073   // Different execute methods depending on whether input is structured or not
00074   void StructuredExecute(vtkDataSet *, vtkUnstructuredGrid *);
00075   void UnstructuredExecute(vtkDataSet *, vtkUnstructuredGrid *);
00076 
00077   int TetrahedraOnly;
00078 
00079 private:
00080   vtkDataSetTriangleFilter(const vtkDataSetTriangleFilter&);  // Not implemented.
00081   void operator=(const vtkDataSetTriangleFilter&);  // Not implemented.
00082 };
00083 
00084 #endif
00085 
00086