VTK  9.2.6
vtkPlaneCutter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPlaneCutter.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=========================================================================*/
77#ifndef vtkPlaneCutter_h
78#define vtkPlaneCutter_h
79
81#include "vtkFiltersCoreModule.h" // For export macro
82#include "vtkSmartPointer.h" // For SmartPointer
83#include <map> // For std::map
84
85class vtkCellArray;
86class vtkCellData;
87class vtkImageData;
92class vtkPlane;
93class vtkPointData;
94class vtkPoints;
95class vtkPolyData;
96class vtkSphereTree;
100
101class VTKFILTERSCORE_EXPORT vtkPlaneCutter : public vtkDataObjectAlgorithm
102{
103public:
105
110 void PrintSelf(ostream& os, vtkIndent indent) override;
112
117
119
124 virtual void SetPlane(vtkPlane*);
125 vtkGetObjectMacro(Plane, vtkPlane);
127
129
135 vtkSetMacro(ComputeNormals, bool);
136 vtkGetMacro(ComputeNormals, bool);
137 vtkBooleanMacro(ComputeNormals, bool);
139
141
146 vtkSetMacro(InterpolateAttributes, bool);
147 vtkGetMacro(InterpolateAttributes, bool);
148 vtkBooleanMacro(InterpolateAttributes, bool);
150
152
157 vtkSetMacro(GeneratePolygons, bool);
158 vtkGetMacro(GeneratePolygons, bool);
159 vtkBooleanMacro(GeneratePolygons, bool);
161
163
169 vtkSetMacro(BuildTree, bool);
170 vtkGetMacro(BuildTree, bool);
171 vtkBooleanMacro(BuildTree, bool);
173
175
181 vtkSetMacro(BuildHierarchy, bool);
182 vtkGetMacro(BuildHierarchy, bool);
183 vtkBooleanMacro(BuildHierarchy, bool);
185
186protected:
188 ~vtkPlaneCutter() override;
189
196
197 // Helpers
198 // Support delegation to vtkPolyDataPlaneCutter. Checking convexity can be
199 // time consuming.
202
204 std::map<vtkDataSet*, vtkSmartPointer<vtkSphereTree>> SphereTrees;
206 {
209
211 : Input(nullptr)
212 , LastMTime(0)
213 {
214 }
216 : Input(input)
217 , LastMTime(mtime)
218 {
219 }
220 };
222
223 // Pipeline-related methods
227 int FillInputPortInformation(int port, vtkInformation* info) override;
228 int FillOutputPortInformation(int port, vtkInformation* info) override;
229
235 vtkPartitionedDataSet* input, vtkPartitionedDataSet* output, bool copyStructure);
237
238 static void AddNormalArray(double* planeNormal, vtkPolyData* polyData);
239
240private:
241 vtkPlaneCutter(const vtkPlaneCutter&) = delete;
242 void operator=(const vtkPlaneCutter&) = delete;
243};
244
245#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:42
Superclass for algorithms that produce only data object as output.
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:63
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
composite dataset to encapsulates pieces of dataset.
Composite dataset that groups datasets as a collection.
composite dataset to encapsulates a dataset consisting of partitions.
cut any dataset with a plane and generate a polygonal cut surface
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
static vtkPlaneCutter * New()
Standard construction and print methods.
int ExecuteUniformGridAMR(vtkUniformGridAMR *input, vtkPartitionedDataSetCollection *output)
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
int ExecuteDataSet(vtkDataSet *input, vtkSphereTree *tree, vtkPolyData *output)
std::map< vtkDataSet *, vtkSmartPointer< vtkSphereTree > > SphereTrees
int ExecutePartitionedDataCollection(vtkPartitionedDataSetCollection *input, vtkPartitionedDataSetCollection *output)
~vtkPlaneCutter() override
virtual void SetPlane(vtkPlane *)
Specify the plane (an implicit function) to perform the cutting.
int ExecuteMultiBlockDataSet(vtkMultiBlockDataSet *input, vtkMultiBlockDataSet *output)
vtkMTimeType GetMTime() override
The modified time depends on the delegated cut plane.
vtkSphereTree * GetSphereTree(vtkDataSet *)
int ExecutePartitionedData(vtkPartitionedDataSet *input, vtkPartitionedDataSet *output, bool copyStructure)
perform various plane computations
Definition vtkPlane.h:37
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:40
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
class to build and traverse sphere trees
topologically regular array of data
a concrete implementation of vtkCompositeDataSet
dataset represents arbitrary combinations of all possible cell types
vtkInputInfo(vtkDataObject *input, vtkMTimeType mtime)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287