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 =========================================================================*/
27 #ifndef vtkClipConvexPolyData_h
28 #define vtkClipConvexPolyData_h
29 
30 #include "vtkFiltersGeneralModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 class vtkPlaneCollection;
34 class vtkPlane;
35 class vtkClipConvexPolyDataInternals;
36 
37 class VTKFILTERSGENERAL_EXPORT vtkClipConvexPolyData : public vtkPolyDataAlgorithm
38 {
39 public:
40  static vtkClipConvexPolyData *New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
49  void SetPlanes(vtkPlaneCollection *planes);
50  vtkGetObjectMacro(Planes,vtkPlaneCollection);
52 
57  vtkMTimeType GetMTime() override;
58 
59 protected:
61  ~vtkClipConvexPolyData() override;
62 
63  // The method that does it all...
64  int RequestData(vtkInformation *request,
65  vtkInformationVector **inputVector,
66  vtkInformationVector *outputVector) override;
67 
72  void ClipWithPlane(vtkPlane *p,
73  double tolerance);
74 
78  bool HasDegeneracies(vtkPlane *p);
79 
83  void ClearInternals();
84 
88  void ClearNewVertices();
89 
93  void RemoveEmptyPolygons();
94 
96  vtkClipConvexPolyDataInternals *Internal;
97 
98 private:
100  void operator=(const vtkClipConvexPolyData&) = delete;
101 };
102 
103 #endif
vtkPlane
perform various plane computations
Definition: vtkPlane.h:37
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkClipConvexPolyData
clip any dataset with user-specified implicit function or input scalar data
Definition: vtkClipConvexPolyData.h:37
vtkClipConvexPolyData::Internal
vtkClipConvexPolyDataInternals * Internal
Definition: vtkClipConvexPolyData.h:96
vtkPlaneCollection
maintain a list of planes
Definition: vtkPlaneCollection.h:36
vtkClipConvexPolyData::Planes
vtkPlaneCollection * Planes
Definition: vtkClipConvexPolyData.h:95
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44