Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Graphics/vtkCleanPolyData.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCleanPolyData.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00078 #ifndef __vtkCleanPolyData_h
00079 #define __vtkCleanPolyData_h
00080 
00081 #include "vtkPolyDataToPolyDataFilter.h"
00082 
00083 class vtkPointLocator;
00084 
00085 class VTK_GRAPHICS_EXPORT vtkCleanPolyData : public vtkPolyDataToPolyDataFilter
00086 {
00087 public:
00088   static vtkCleanPolyData *New();
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090   vtkTypeRevisionMacro(vtkCleanPolyData,vtkPolyDataToPolyDataFilter);
00091 
00093 
00096   vtkSetMacro(ToleranceIsAbsolute,int);
00097   vtkBooleanMacro(ToleranceIsAbsolute,int);
00098   vtkGetMacro(ToleranceIsAbsolute,int);
00100 
00102 
00103   vtkSetClampMacro(Tolerance,float,0.0,1.0);
00104   vtkGetMacro(Tolerance,float);
00106 
00108 
00109   vtkSetClampMacro(AbsoluteTolerance,float,0.0,VTK_LARGE_FLOAT);
00110   vtkGetMacro(AbsoluteTolerance,float);
00112 
00114 
00115   vtkSetMacro(ConvertLinesToPoints,int);
00116   vtkBooleanMacro(ConvertLinesToPoints,int);
00117   vtkGetMacro(ConvertLinesToPoints,int);
00119 
00121 
00122   vtkSetMacro(ConvertPolysToLines,int);
00123   vtkBooleanMacro(ConvertPolysToLines,int);
00124   vtkGetMacro(ConvertPolysToLines,int);
00126 
00128 
00129   vtkSetMacro(ConvertStripsToPolys,int);
00130   vtkBooleanMacro(ConvertStripsToPolys,int);
00131   vtkGetMacro(ConvertStripsToPolys,int);
00133 
00135 
00139   vtkSetMacro(PointMerging,int);
00140   vtkGetMacro(PointMerging,int);
00141   vtkBooleanMacro(PointMerging,int);
00143 
00145 
00147   void SetLocator(vtkPointLocator *locator);
00148   vtkGetObjectMacro(Locator,vtkPointLocator);
00150 
00152   void CreateDefaultLocator(void);
00153 
00155   void ReleaseLocator(void);
00156 
00158   unsigned long int GetMTime();
00159 
00161   virtual void OperateOnPoint(float in[3], float out[3]);
00162 
00164   virtual void OperateOnBounds(float in[6], float out[6]);
00165 
00166   // This filter is difficult to stream.
00167   // To get invariant results, the whole input must be processed at once.
00168   // This flag allows the user to select whether strict piece invariance
00169   // is required.  By default it is on.  When off, the filter can stream,
00170   // but results may change.
00171   vtkSetMacro(PieceInvariant, int);
00172   vtkGetMacro(PieceInvariant, int);
00173   vtkBooleanMacro(PieceInvariant, int);
00174 
00175 protected:
00176   vtkCleanPolyData();
00177  ~vtkCleanPolyData();
00178 
00179   // Usual data generation method
00180   void Execute();
00181   void ExecuteInformation();
00182   virtual void ComputeInputUpdateExtents(vtkDataObject *output);
00183 
00184   int   PointMerging;
00185   float Tolerance;
00186   float AbsoluteTolerance;
00187   int ConvertLinesToPoints;
00188   int ConvertPolysToLines;
00189   int ConvertStripsToPolys;
00190   int ToleranceIsAbsolute;
00191   vtkPointLocator *Locator;
00192 
00193   int PieceInvariant;
00194 private:
00195   vtkCleanPolyData(const vtkCleanPolyData&);  // Not implemented.
00196   void operator=(const vtkCleanPolyData&);  // Not implemented.
00197 };
00198 
00199 #endif
00200 
00201