VTK  9.1.0
vtk3DLinearGridPlaneCutter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtk3DLinearGridPlaneCutter.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 =========================================================================*/
72 #ifndef vtk3DLinearGridPlaneCutter_h
73 #define vtk3DLinearGridPlaneCutter_h
74 
75 #include "vtkDataObjectAlgorithm.h"
76 #include "vtkFiltersCoreModule.h" // For export macro
77 
78 class vtkPlane;
80 class vtkSphereTree;
81 class vtkPolyData;
82 
83 class VTKFILTERSCORE_EXPORT vtk3DLinearGridPlaneCutter : public vtkDataObjectAlgorithm
84 {
85 public:
87 
92  void PrintSelf(ostream& os, vtkIndent indent) override;
94 
96 
101  virtual void SetPlane(vtkPlane*);
102  vtkGetObjectMacro(Plane, vtkPlane);
104 
106 
112  vtkSetMacro(MergePoints, bool);
113  vtkGetMacro(MergePoints, bool);
114  vtkBooleanMacro(MergePoints, bool);
116 
118 
122  vtkSetMacro(InterpolateAttributes, bool);
123  vtkGetMacro(InterpolateAttributes, bool);
124  vtkBooleanMacro(InterpolateAttributes, bool);
126 
128 
134  vtkSetMacro(ComputeNormals, bool);
135  vtkGetMacro(ComputeNormals, bool);
136  vtkBooleanMacro(ComputeNormals, bool);
138 
143  vtkMTimeType GetMTime() override;
144 
146 
151  void SetOutputPointsPrecision(int precision);
154 
156 
164  vtkSetMacro(SequentialProcessing, bool);
165  vtkGetMacro(SequentialProcessing, bool);
166  vtkBooleanMacro(SequentialProcessing, bool);
168 
173  int GetNumberOfThreadsUsed() { return this->NumberOfThreadsUsed; }
174 
183  bool GetLargeIds() { return this->LargeIds; }
184 
192 
193 protected:
196 
204  bool LargeIds; // indicate whether integral ids are large(==true) or not
205 
206  // Process the data: input unstructured grid and output polydata
207  int ProcessPiece(vtkUnstructuredGrid* input, vtkPlane* plane, vtkPolyData* output);
208 
210  vtkInformationVector* outputVector) override;
211  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
212  vtkInformationVector* outputVector) override;
214 
215 private:
217  void operator=(const vtk3DLinearGridPlaneCutter&) = delete;
218 };
219 
220 #endif
vtkPlane
perform various plane computations
Definition: vtkPlane.h:143
vtk3DLinearGridPlaneCutter::LargeIds
bool LargeIds
Definition: vtk3DLinearGridPlaneCutter.h:204
vtk3DLinearGridPlaneCutter::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtk3DLinearGridPlaneCutter::New
static vtk3DLinearGridPlaneCutter * New()
Standard methods for construction, type info, and printing.
vtk3DLinearGridPlaneCutter::ComputeNormals
bool ComputeNormals
Definition: vtk3DLinearGridPlaneCutter.h:200
vtk3DLinearGridPlaneCutter
fast plane cutting of vtkUnstructuredGrid containing 3D linear cells
Definition: vtk3DLinearGridPlaneCutter.h:84
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:63
vtk3DLinearGridPlaneCutter::ProcessPiece
int ProcessPiece(vtkUnstructuredGrid *input, vtkPlane *plane, vtkPolyData *output)
vtk3DLinearGridPlaneCutter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtk3DLinearGridPlaneCutter.h:201
vtk3DLinearGridPlaneCutter::RequestDataObject
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtk3DLinearGridPlaneCutter::GetMTime
vtkMTimeType GetMTime() override
Overloaded GetMTime() because of delegation to the helper vtkPlane.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtk3DLinearGridPlaneCutter::GetLargeIds
bool GetLargeIds()
Inform the user as to whether large ids were used during filter execution.
Definition: vtk3DLinearGridPlaneCutter.h:183
vtk3DLinearGridPlaneCutter::Plane
vtkPlane * Plane
Definition: vtk3DLinearGridPlaneCutter.h:197
vtk3DLinearGridPlaneCutter::vtk3DLinearGridPlaneCutter
vtk3DLinearGridPlaneCutter()
vtk3DLinearGridPlaneCutter::MergePoints
bool MergePoints
Definition: vtk3DLinearGridPlaneCutter.h:198
vtk3DLinearGridPlaneCutter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtk3DLinearGridPlaneCutter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type info, and printing.
vtk3DLinearGridPlaneCutter::SequentialProcessing
bool SequentialProcessing
Definition: vtk3DLinearGridPlaneCutter.h:202
vtk3DLinearGridPlaneCutter::SetOutputPointsPrecision
void SetOutputPointsPrecision(int precision)
Set/get the desired precision for the output points.
vtk3DLinearGridPlaneCutter::~vtk3DLinearGridPlaneCutter
~vtk3DLinearGridPlaneCutter() override
vtk3DLinearGridPlaneCutter::GetNumberOfThreadsUsed
int GetNumberOfThreadsUsed()
Return the number of threads actually used during execution.
Definition: vtk3DLinearGridPlaneCutter.h:173
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkSphereTree
class to build and traverse sphere trees
Definition: vtkSphereTree.h:70
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtk3DLinearGridPlaneCutter::CanFullyProcessDataObject
static bool CanFullyProcessDataObject(vtkDataObject *object)
Returns true if the data object passed in is fully supported by this filter, i.e.,...
vtk3DLinearGridPlaneCutter::NumberOfThreadsUsed
int NumberOfThreadsUsed
Definition: vtk3DLinearGridPlaneCutter.h:203
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkDataObjectAlgorithm.h
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtk3DLinearGridPlaneCutter::SetPlane
virtual void SetPlane(vtkPlane *)
Specify the plane (an implicit function) to perform the cutting.
vtk3DLinearGridPlaneCutter::GetOutputPointsPrecision
int GetOutputPointsPrecision() const
Set/get the desired precision for the output points.
vtk3DLinearGridPlaneCutter::InterpolateAttributes
bool InterpolateAttributes
Definition: vtk3DLinearGridPlaneCutter.h:199
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287