VTK  9.3.0
vtk3DLinearGridPlaneCutter.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
63 #ifndef vtk3DLinearGridPlaneCutter_h
64 #define vtk3DLinearGridPlaneCutter_h
65 
66 #include "vtkDataObjectAlgorithm.h"
67 #include "vtkFiltersCoreModule.h" // For export macro
68 
69 VTK_ABI_NAMESPACE_BEGIN
70 class vtkPlane;
72 class vtkPolyData;
73 
74 class VTKFILTERSCORE_EXPORT vtk3DLinearGridPlaneCutter : public vtkDataObjectAlgorithm
75 {
76 public:
78 
83  void PrintSelf(ostream& os, vtkIndent indent) override;
85 
87 
92  virtual void SetPlane(vtkPlane*);
93  vtkGetObjectMacro(Plane, vtkPlane);
95 
97 
103  vtkSetMacro(MergePoints, bool);
104  vtkGetMacro(MergePoints, bool);
105  vtkBooleanMacro(MergePoints, bool);
107 
109 
113  vtkSetMacro(InterpolateAttributes, bool);
114  vtkGetMacro(InterpolateAttributes, bool);
115  vtkBooleanMacro(InterpolateAttributes, bool);
117 
119 
125  vtkSetMacro(ComputeNormals, bool);
126  vtkGetMacro(ComputeNormals, bool);
127  vtkBooleanMacro(ComputeNormals, bool);
129 
134  vtkMTimeType GetMTime() override;
135 
137 
142  void SetOutputPointsPrecision(int precision);
145 
147 
155  vtkSetMacro(SequentialProcessing, bool);
156  vtkGetMacro(SequentialProcessing, bool);
157  vtkBooleanMacro(SequentialProcessing, bool);
159 
164  int GetNumberOfThreadsUsed() { return this->NumberOfThreadsUsed; }
165 
174  bool GetLargeIds() { return this->LargeIds; }
175 
183 
184 protected:
187 
195  bool LargeIds; // indicate whether integral ids are large(==true) or not
196 
197  // Process the data: input unstructured grid and output polydata
198  int ProcessPiece(vtkUnstructuredGrid* input, vtkPlane* plane, vtkPolyData* output);
199 
201  vtkInformationVector* outputVector) override;
202  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
203  vtkInformationVector* outputVector) override;
205 
206 private:
208  void operator=(const vtk3DLinearGridPlaneCutter&) = delete;
209 };
210 
211 VTK_ABI_NAMESPACE_END
212 #endif
fast plane cutting of vtkUnstructuredGrid containing 3D linear cells
void SetOutputPointsPrecision(int precision)
Set/get the desired precision for the output points.
int GetNumberOfThreadsUsed()
Return the number of threads actually used during execution.
~vtk3DLinearGridPlaneCutter() override
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int GetOutputPointsPrecision() const
Set/get the desired precision for the output points.
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
virtual void SetPlane(vtkPlane *)
Specify the plane (an implicit function) to perform the cutting.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type info, and printing.
static vtk3DLinearGridPlaneCutter * New()
Standard methods for construction, type info, and printing.
bool GetLargeIds()
Inform the user as to whether large ids were used during filter execution.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int ProcessPiece(vtkUnstructuredGrid *input, vtkPlane *plane, vtkPolyData *output)
static bool CanFullyProcessDataObject(vtkDataObject *object)
Returns true if the data object passed in is fully supported by this filter, i.e.,...
vtkMTimeType GetMTime() override
Overloaded GetMTime() because of delegation to the helper vtkPlane.
Superclass for algorithms that produce only data object as output.
general representation of visualization data
Definition: vtkDataObject.h:55
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
perform various plane computations
Definition: vtkPlane.h:26
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:80
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270