VTK  9.3.20240328
vtkClipConvexPolyData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkClipConvexPolyData_h
16 #define vtkClipConvexPolyData_h
17 
18 #include "vtkFiltersGeneralModule.h" // For export macro
19 #include "vtkPolyDataAlgorithm.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkPlaneCollection;
23 class vtkPlane;
24 class vtkClipConvexPolyDataInternals;
25 
26 class VTKFILTERSGENERAL_EXPORT vtkClipConvexPolyData : public vtkPolyDataAlgorithm
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
39  vtkGetObjectMacro(Planes, vtkPlaneCollection);
41 
46  vtkMTimeType GetMTime() override;
47 
48 protected:
51 
52  // The method that does it all...
53  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
54  vtkInformationVector* outputVector) override;
55 
60  void ClipWithPlane(vtkPlane* p, double tolerance);
61 
66 
71 
76 
81 
83  vtkClipConvexPolyDataInternals* Internal;
84 
85 private:
87  void operator=(const vtkClipConvexPolyData&) = delete;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
clip any dataset with user-specified implicit function or input scalar data
vtkClipConvexPolyDataInternals * Internal
void ClipWithPlane(vtkPlane *p, double tolerance)
Clip the input with a given plane ā€˜pā€™.
void ClearInternals()
Delete calculation data.
vtkPlaneCollection * Planes
bool HasDegeneracies(vtkPlane *p)
Tells if clipping the input by plane ā€˜pā€™ creates some degeneracies.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkClipConvexPolyData * New()
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
~vtkClipConvexPolyData() override
vtkMTimeType GetMTime() override
Redefines this method, as this filter depends on time of its components (planes)
void SetPlanes(vtkPlaneCollection *planes)
Set all the planes at once using a vtkPlanes implicit function.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
maintain a list of planes
perform various plane computations
Definition: vtkPlane.h:135
Superclass for algorithms that produce only polydata as output.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270