VTK  9.0.20210223
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 =========================================================================*/
24 #ifndef vtkClipConvexPolyData_h
25 #define vtkClipConvexPolyData_h
26 
27 #include "vtkFiltersGeneralModule.h" // For export macro
28 #include "vtkPolyDataAlgorithm.h"
29 
30 class vtkPlaneCollection;
31 class vtkPlane;
32 class vtkClipConvexPolyDataInternals;
33 
34 class VTKFILTERSGENERAL_EXPORT vtkClipConvexPolyData : public vtkPolyDataAlgorithm
35 {
36 public:
37  static vtkClipConvexPolyData* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
46  void SetPlanes(vtkPlaneCollection* planes);
47  vtkGetObjectMacro(Planes, vtkPlaneCollection);
49 
54  vtkMTimeType GetMTime() override;
55 
56 protected:
58  ~vtkClipConvexPolyData() override;
59 
60  // The method that does it all...
61  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
62  vtkInformationVector* outputVector) override;
63 
68  void ClipWithPlane(vtkPlane* p, double tolerance);
69 
73  bool HasDegeneracies(vtkPlane* p);
74 
78  void ClearInternals();
79 
83  void ClearNewVertices();
84 
88  void RemoveEmptyPolygons();
89 
91  vtkClipConvexPolyDataInternals* Internal;
92 
93 private:
95  void operator=(const vtkClipConvexPolyData&) = delete;
96 };
97 
98 #endif
vtkPlane
perform various plane computations
Definition: vtkPlane.h:33
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
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:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkClipConvexPolyData
clip any dataset with user-specified implicit function or input scalar data
Definition: vtkClipConvexPolyData.h:34
vtkClipConvexPolyData::Internal
vtkClipConvexPolyDataInternals * Internal
Definition: vtkClipConvexPolyData.h:91
vtkPlaneCollection
maintain a list of planes
Definition: vtkPlaneCollection.h:33
vtkClipConvexPolyData::Planes
vtkPlaneCollection * Planes
Definition: vtkClipConvexPolyData.h:90
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41