VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkClipConvexPolyData.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 =========================================================================*/ 00026 #ifndef __vtkClipConvexPolyData_h 00027 #define __vtkClipConvexPolyData_h 00028 00029 #include "vtkFiltersGeneralModule.h" // For export macro 00030 #include "vtkPolyDataAlgorithm.h" 00031 00032 class vtkPlaneCollection; 00033 class vtkPlane; 00034 class vtkClipConvexPolyDataInternals; 00035 00036 class VTKFILTERSGENERAL_EXPORT vtkClipConvexPolyData : public vtkPolyDataAlgorithm 00037 { 00038 public: 00039 static vtkClipConvexPolyData *New(); 00040 vtkTypeMacro(vtkClipConvexPolyData,vtkPolyDataAlgorithm); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00046 void SetPlanes(vtkPlaneCollection *planes); 00047 vtkGetObjectMacro(Planes,vtkPlaneCollection); 00049 00052 virtual unsigned long int GetMTime(); 00053 00054 protected: 00055 vtkClipConvexPolyData(); 00056 ~vtkClipConvexPolyData(); 00057 00058 // The method that does it all... 00059 int RequestData(vtkInformation *request, 00060 vtkInformationVector **inputVector, 00061 vtkInformationVector *outputVector); 00062 00064 00065 void ClipWithPlane(vtkPlane *p, 00066 double tolerance); 00068 00070 bool HasDegeneracies(vtkPlane *p); 00071 00073 void ClearInternals(); 00074 00076 void ClearNewVertices(); 00077 00079 void RemoveEmptyPolygons(); 00080 00081 vtkPlaneCollection *Planes; 00082 vtkClipConvexPolyDataInternals *Internal; 00083 00084 private: 00085 vtkClipConvexPolyData(const vtkClipConvexPolyData&); // Not implemented. 00086 void operator=(const vtkClipConvexPolyData&); // Not implemented. 00087 }; 00088 00089 #endif