VTK
vtkClipConvexPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClipConvexPolyData.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkClipConvexPolyData_h
27 #define vtkClipConvexPolyData_h
28 
29 #include "vtkFiltersGeneralModule.h" // For export macro
30 #include "vtkPolyDataAlgorithm.h"
31 
32 class vtkPlaneCollection;
33 class vtkPlane;
34 class vtkClipConvexPolyDataInternals;
35 
37 {
38 public:
39  static vtkClipConvexPolyData *New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
46  void SetPlanes(vtkPlaneCollection *planes);
47  vtkGetObjectMacro(Planes,vtkPlaneCollection);
49 
52  virtual unsigned long int GetMTime();
53 
54 protected:
57 
58  // The method that does it all...
59  int RequestData(vtkInformation *request,
60  vtkInformationVector **inputVector,
61  vtkInformationVector *outputVector);
62 
64 
65  void ClipWithPlane(vtkPlane *p,
66  double tolerance);
68 
70  bool HasDegeneracies(vtkPlane *p);
71 
73  void ClearInternals();
74 
76  void ClearNewVertices();
77 
79  void RemoveEmptyPolygons();
80 
82  vtkClipConvexPolyDataInternals *Internal;
83 
84 private:
85  vtkClipConvexPolyData(const vtkClipConvexPolyData&); // Not implemented.
86  void operator=(const vtkClipConvexPolyData&); // Not implemented.
87 };
88 
89 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
maintain a list of planes
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
vtkPlaneCollection * Planes
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
perform various plane computations
Definition: vtkPlane.h:36
#define VTKFILTERSGENERAL_EXPORT
vtkClipConvexPolyDataInternals * Internal
Store zero or more vtkInformation instances.
clip any dataset with user-specified implicit function or input scalar data