VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCleanPolyData.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 =========================================================================*/ 00070 #ifndef __vtkCleanPolyData_h 00071 #define __vtkCleanPolyData_h 00072 00073 #include "vtkFiltersCoreModule.h" // For export macro 00074 #include "vtkPolyDataAlgorithm.h" 00075 00076 class vtkIncrementalPointLocator; 00077 00078 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm 00079 { 00080 public: 00081 static vtkCleanPolyData *New(); 00082 void PrintSelf(ostream& os, vtkIndent indent); 00083 vtkTypeMacro(vtkCleanPolyData,vtkPolyDataAlgorithm); 00084 00086 00089 vtkSetMacro(ToleranceIsAbsolute,int); 00090 vtkBooleanMacro(ToleranceIsAbsolute,int); 00091 vtkGetMacro(ToleranceIsAbsolute,int); 00093 00095 00097 vtkSetClampMacro(Tolerance,double,0.0,1.0); 00098 vtkGetMacro(Tolerance,double); 00100 00102 00103 vtkSetClampMacro(AbsoluteTolerance,double,0.0,VTK_DOUBLE_MAX); 00104 vtkGetMacro(AbsoluteTolerance,double); 00106 00108 00109 vtkSetMacro(ConvertLinesToPoints,int); 00110 vtkBooleanMacro(ConvertLinesToPoints,int); 00111 vtkGetMacro(ConvertLinesToPoints,int); 00113 00115 00116 vtkSetMacro(ConvertPolysToLines,int); 00117 vtkBooleanMacro(ConvertPolysToLines,int); 00118 vtkGetMacro(ConvertPolysToLines,int); 00120 00122 00123 vtkSetMacro(ConvertStripsToPolys,int); 00124 vtkBooleanMacro(ConvertStripsToPolys,int); 00125 vtkGetMacro(ConvertStripsToPolys,int); 00127 00129 00133 vtkSetMacro(PointMerging,int); 00134 vtkGetMacro(PointMerging,int); 00135 vtkBooleanMacro(PointMerging,int); 00137 00139 00141 virtual void SetLocator(vtkIncrementalPointLocator *locator); 00142 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00144 00146 void CreateDefaultLocator(vtkPolyData *input = 0); 00147 00149 void ReleaseLocator() { this->SetLocator(NULL); } 00150 00152 unsigned long int GetMTime(); 00153 00155 virtual void OperateOnPoint(double in[3], double out[3]); 00156 00158 virtual void OperateOnBounds(double in[6], double out[6]); 00159 00160 // This filter is difficult to stream. 00161 // To get invariant results, the whole input must be processed at once. 00162 // This flag allows the user to select whether strict piece invariance 00163 // is required. By default it is on. When off, the filter can stream, 00164 // but results may change. 00165 vtkSetMacro(PieceInvariant, int); 00166 vtkGetMacro(PieceInvariant, int); 00167 vtkBooleanMacro(PieceInvariant, int); 00168 00169 protected: 00170 vtkCleanPolyData(); 00171 ~vtkCleanPolyData(); 00172 00173 // Usual data generation method 00174 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00175 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00176 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00177 00178 int PointMerging; 00179 double Tolerance; 00180 double AbsoluteTolerance; 00181 int ConvertLinesToPoints; 00182 int ConvertPolysToLines; 00183 int ConvertStripsToPolys; 00184 int ToleranceIsAbsolute; 00185 vtkIncrementalPointLocator *Locator; 00186 00187 int PieceInvariant; 00188 private: 00189 vtkCleanPolyData(const vtkCleanPolyData&); // Not implemented. 00190 void operator=(const vtkCleanPolyData&); // Not implemented. 00191 }; 00192 00193 #endif