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=========================================================================*/
74#ifndef vtkPlaneCutter_h
75#define vtkPlaneCutter_h
76
78#include "vtkFiltersCoreModule.h" // For export macro
79#include "vtkSmartPointer.h" // For SmartPointer
80#include <map> // For std::map
81
82class vtkCellArray;
83class vtkCellData;
84class vtkImageData;
89class vtkPlane;
90class vtkPointData;
91class vtkPoints;
92class vtkPolyData;
93class vtkSphereTree;
97
98class VTKFILTERSCORE_EXPORT vtkPlaneCutter : public vtkDataObjectAlgorithm
99{
100public:
102
107 void PrintSelf(ostream& os, vtkIndent indent) override;
109
114
116
121 virtual void SetPlane(vtkPlane*);
122 vtkGetObjectMacro(Plane, vtkPlane);
124
126
132 vtkSetMacro(ComputeNormals, bool);
133 vtkGetMacro(ComputeNormals, bool);
134 vtkBooleanMacro(ComputeNormals, bool);
136
138
143 vtkSetMacro(InterpolateAttributes, bool);
144 vtkGetMacro(InterpolateAttributes, bool);
145 vtkBooleanMacro(InterpolateAttributes, bool);
147
149
154 vtkSetMacro(GeneratePolygons, bool);
155 vtkGetMacro(GeneratePolygons, bool);
156 vtkBooleanMacro(GeneratePolygons, bool);
158
160
166 vtkSetMacro(BuildTree, bool);
167 vtkGetMacro(BuildTree, bool);
168 vtkBooleanMacro(BuildTree, bool);
170
172
178 vtkSetMacro(BuildHierarchy, bool);
179 vtkGetMacro(BuildHierarchy, bool);
180 vtkBooleanMacro(BuildHierarchy, bool);
182
183protected:
185 ~vtkPlaneCutter() override;
186
193
194 // Helpers
195 // Support delegation to vtkPolyDataPlaneCutter. Checking convexity can be
196 // time consuming.
199
201 std::map<vtkDataSet*, vtkSmartPointer<vtkSphereTree>> SphereTrees;
203 {
206
208 : Input(nullptr)
209 , LastMTime(0)
210 {
211 }
213 : Input(input)
214 , LastMTime(mtime)
215 {
216 }
217 };
219
220 // Pipeline-related methods
224 int FillInputPortInformation(int port, vtkInformation* info) override;
225 int FillOutputPortInformation(int port, vtkInformation* info) override;
226
232 vtkPartitionedDataSet* input, vtkPartitionedDataSet* output, bool copyStructure);
234
235 static void AddNormalArray(double* planeNormal, vtkPolyData* polyData);
236
237private:
238 vtkPlaneCutter(const vtkPlaneCutter&) = delete;
239 void operator=(const vtkPlaneCutter&) = delete;
240};
241
242#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:36
Superclass for algorithms that produce only data object as output.
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:34
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:34
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:34
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
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