VTK
dox/Graphics/vtkClipConvexPolyData.h
Go to the documentation of this file.
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 "vtkPolyDataAlgorithm.h"
00030 
00031 class vtkPlaneCollection;
00032 class vtkPlane;
00033 class vtkClipConvexPolyDataInternals;
00034 
00035 class VTK_GRAPHICS_EXPORT vtkClipConvexPolyData : public vtkPolyDataAlgorithm
00036 {
00037 public:
00038   static vtkClipConvexPolyData *New();
00039   vtkTypeMacro(vtkClipConvexPolyData,vtkPolyDataAlgorithm);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043 
00045   void SetPlanes(vtkPlaneCollection *planes);
00046   vtkGetObjectMacro(Planes,vtkPlaneCollection);
00048   
00051   virtual unsigned long int GetMTime();
00052   
00053 protected:
00054   vtkClipConvexPolyData();
00055   ~vtkClipConvexPolyData();
00056   
00057   // The method that does it all...
00058   int RequestData(vtkInformation *request,
00059                   vtkInformationVector **inputVector,
00060                   vtkInformationVector *outputVector);
00061   
00063 
00064   void ClipWithPlane(vtkPlane *p,
00065                      double tolerance);
00067   
00069   bool HasDegeneracies(vtkPlane *p);
00070 
00072   void ClearInternals();
00073   
00075   void ClearNewVertices();
00076   
00078   void RemoveEmptyPolygons();
00079   
00080   vtkPlaneCollection *Planes;
00081   vtkClipConvexPolyDataInternals *Internal;
00082   
00083 private:
00084   vtkClipConvexPolyData(const vtkClipConvexPolyData&);  // Not implemented.
00085   void operator=(const vtkClipConvexPolyData&);  // Not implemented.
00086 };
00087 
00088 #endif