VTK: Filters/Core/vtk3DLinearGridPlaneCutter.h Source File

| VTK 9.3.1

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;
71 class vtkUnstructuredGrid;
72 class vtkPolyData;
73
74 class VTKFILTERSCORE_EXPORT vtk3DLinearGridPlaneCutter : public vtkDataObjectAlgorithm
75 {
76 public:
78
81 static vtk3DLinearGridPlaneCutter* New();
82 vtkTypeMacro(vtk3DLinearGridPlaneCutter, vtkDataObjectAlgorithm);
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);
143 int GetOutputPointsPrecision() const;
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
182 static bool CanFullyProcessDataObject(vtkDataObject* object);
183
184 protected:
185 vtk3DLinearGridPlaneCutter();
186 ~vtk3DLinearGridPlaneCutter() override;
187
188 vtkPlane* Plane;
189 bool MergePoints;
190 bool InterpolateAttributes;
191 bool ComputeNormals;
192 int OutputPointsPrecision;
193 bool SequentialProcessing;
194 int NumberOfThreadsUsed;
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
200 int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
201 vtkInformationVector* outputVector) override;
202 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
203 vtkInformationVector* outputVector) override;
204 int FillInputPortInformation(int port, vtkInformation* info) override;
205
206 private:
207 vtk3DLinearGridPlaneCutter(const vtk3DLinearGridPlaneCutter&) = delete;
208 void operator=(const vtk3DLinearGridPlaneCutter&) = delete;
209 };
210
211 VTK_ABI_NAMESPACE_END
212 #endif
vtk3DLinearGridPlaneCutter
fast plane cutting of vtkUnstructuredGrid containing 3D linear cells
Definition: vtk3DLinearGridPlaneCutter.h:75
vtk3DLinearGridPlaneCutter::SetOutputPointsPrecision
void SetOutputPointsPrecision(int precision)
Set/get the desired precision for the output points.
vtk3DLinearGridPlaneCutter::InterpolateAttributes
bool InterpolateAttributes
Definition: vtk3DLinearGridPlaneCutter.h:190
vtk3DLinearGridPlaneCutter::SequentialProcessing
bool SequentialProcessing
Definition: vtk3DLinearGridPlaneCutter.h:193
vtk3DLinearGridPlaneCutter::GetNumberOfThreadsUsed
int GetNumberOfThreadsUsed()
Return the number of threads actually used during execution.
Definition: vtk3DLinearGridPlaneCutter.h:164
vtk3DLinearGridPlaneCutter::~vtk3DLinearGridPlaneCutter
~vtk3DLinearGridPlaneCutter() override
vtk3DLinearGridPlaneCutter::vtk3DLinearGridPlaneCutter
vtk3DLinearGridPlaneCutter()
vtk3DLinearGridPlaneCutter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtk3DLinearGridPlaneCutter::GetOutputPointsPrecision
int GetOutputPointsPrecision() const
Set/get the desired precision for the output points.
vtk3DLinearGridPlaneCutter::LargeIds
bool LargeIds
Definition: vtk3DLinearGridPlaneCutter.h:195
vtk3DLinearGridPlaneCutter::RequestDataObject
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtk3DLinearGridPlaneCutter::MergePoints
bool MergePoints
Definition: vtk3DLinearGridPlaneCutter.h:189
vtk3DLinearGridPlaneCutter::ComputeNormals
bool ComputeNormals
Definition: vtk3DLinearGridPlaneCutter.h:191
vtk3DLinearGridPlaneCutter::SetPlane
virtual void SetPlane(vtkPlane *)
Specify the plane (an implicit function) to perform the cutting.
vtk3DLinearGridPlaneCutter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type info, and printing.
vtk3DLinearGridPlaneCutter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtk3DLinearGridPlaneCutter.h:192
vtk3DLinearGridPlaneCutter::New
static vtk3DLinearGridPlaneCutter * New()
Standard methods for construction, type info, and printing.
vtk3DLinearGridPlaneCutter::GetLargeIds
bool GetLargeIds()
Inform the user as to whether large ids were used during filter execution.
Definition: vtk3DLinearGridPlaneCutter.h:174
vtk3DLinearGridPlaneCutter::NumberOfThreadsUsed
int NumberOfThreadsUsed
Definition: vtk3DLinearGridPlaneCutter.h:194
vtk3DLinearGridPlaneCutter::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtk3DLinearGridPlaneCutter::ProcessPiece
int ProcessPiece(vtkUnstructuredGrid *input, vtkPlane *plane, vtkPolyData *output)
vtk3DLinearGridPlaneCutter::CanFullyProcessDataObject
static bool CanFullyProcessDataObject(vtkDataObject *object)
Returns true if the data object passed in is fully supported by this filter, i.e.,...
vtk3DLinearGridPlaneCutter::GetMTime
vtkMTimeType GetMTime() override
Overloaded GetMTime() because of delegation to the helper vtkPlane.
vtk3DLinearGridPlaneCutter::Plane
vtkPlane * Plane
Definition: vtk3DLinearGridPlaneCutter.h:188
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:33
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPlane
perform various plane computations
Definition: vtkPlane.h:35
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:99
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkDataObjectAlgorithm.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270