VTK  9.5.20251207
vtkPlaneCutter.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
61
62#ifndef vtkPlaneCutter_h
63#define vtkPlaneCutter_h
64
66#include "vtkFiltersCoreModule.h" // For export macro
67#include "vtkSmartPointer.h" // For SmartPointer
68#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
69#include <map> // For std::map
70
71VTK_ABI_NAMESPACE_BEGIN
73class vtkPlane;
74class vtkPolyData;
75class vtkSphereTree;
76
77class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkPlaneCutter : public vtkDataObjectAlgorithm
78{
79public:
81
86 void PrintSelf(ostream& os, vtkIndent indent) override;
88
93
95
100 virtual void SetPlane(vtkPlane*);
101 vtkGetObjectMacro(Plane, vtkPlane);
103
105
111 vtkSetMacro(ComputeNormals, bool);
112 vtkGetMacro(ComputeNormals, bool);
113 vtkBooleanMacro(ComputeNormals, bool);
115
117
122 vtkSetMacro(InterpolateAttributes, bool);
123 vtkGetMacro(InterpolateAttributes, bool);
124 vtkBooleanMacro(InterpolateAttributes, bool);
126
128
133 vtkSetMacro(GeneratePolygons, bool);
134 vtkGetMacro(GeneratePolygons, bool);
135 vtkBooleanMacro(GeneratePolygons, bool);
137
139
145 vtkSetMacro(BuildTree, bool);
146 vtkGetMacro(BuildTree, bool);
147 vtkBooleanMacro(BuildTree, bool);
149
151
157 vtkSetMacro(BuildHierarchy, bool);
158 vtkGetMacro(BuildHierarchy, bool);
159 vtkBooleanMacro(BuildHierarchy, bool);
161
163
171 vtkSetMacro(MergePoints, bool);
172 vtkGetMacro(MergePoints, bool);
173 vtkBooleanMacro(MergePoints, bool);
175
177
183 vtkGetMacro(OutputPointsPrecision, int);
185
186protected:
188 ~vtkPlaneCutter() override;
189
198
199 // Support delegation to vtkPolyDataPlaneCutter/vtk3DLinearGridPlaneCutter.
201
202 std::map<vtkDataSet*, vtkSmartPointer<vtkSphereTree>> SphereTrees;
203 std::map<vtkDataSet*, bool> CanBeFullyProcessed;
205 {
208
210 : Input(nullptr)
211 , LastMTime(0)
212 {
213 }
215 : Input(input)
216 , LastMTime(mtime)
217 {
218 }
219 };
221
222 // Pipeline-related methods
226 int FillInputPortInformation(int port, vtkInformation* info) override;
227 int FillOutputPortInformation(int port, vtkInformation* info) override;
228
231
232 static void AddNormalArray(double* planeNormal, vtkPolyData* polyData);
233
234 // Garbage collection method
236
237private:
238 vtkPlaneCutter(const vtkPlaneCutter&) = delete;
239 void operator=(const vtkPlaneCutter&) = delete;
240};
241
242VTK_ABI_NAMESPACE_END
243#endif
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
Detect and break reference loops.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int ExecuteDataSet(vtkDataSet *input, vtkPolyData *output)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static void AddNormalArray(double *planeNormal, vtkPolyData *polyData)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard construction and print methods.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkInputInfo InputInfo
int ExecuteDataObjectTree(vtkDataObjectTree *input, vtkDataObjectTree *output)
void ReportReferences(vtkGarbageCollector *) override
static vtkPlaneCutter * New()
Standard construction and print methods.
std::map< vtkDataSet *, bool > CanBeFullyProcessed
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
std::map< vtkDataSet *, vtkSmartPointer< vtkSphereTree > > SphereTrees
~vtkPlaneCutter() override
virtual void SetPlane(vtkPlane *)
Specify the plane (an implicit function) to perform the cutting.
vtkMTimeType GetMTime() override
The modified time depends on the delegated cut plane.
perform various plane computations
Definition vtkPlane.h:141
concrete dataset represents vertices, lines, polygons, and triangle strips
class to build and traverse sphere trees
vtkInputInfo(vtkDataObject *input, vtkMTimeType mtime)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:322
#define VTK_MARSHALAUTO