VTK: Filters/General/vtkBoxClipDataSet.h Source File

| VTK 9.3.1

vtkBoxClipDataSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4
45 #ifndef vtkBoxClipDataSet_h
46 #define vtkBoxClipDataSet_h
47
48 #include "vtkFiltersGeneralModule.h" // For export macro
49 #include "vtkUnstructuredGridAlgorithm.h"
50
51 VTK_ABI_NAMESPACE_BEGIN
52 class vtkCell3D;
53 class vtkCellArray;
54 class vtkCellData;
55 class vtkDataArray;
56 class vtkDataSetAttributes;
57 class vtkIdList;
58 class vtkGenericCell;
59 class vtkPointData;
60 class vtkIncrementalPointLocator;
61 class vtkPoints;
62
63 class VTKFILTERSGENERAL_EXPORT vtkBoxClipDataSet : public vtkUnstructuredGridAlgorithm
64 {
65 public:
66 vtkTypeMacro(vtkBoxClipDataSet, vtkUnstructuredGridAlgorithm);
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
74 static vtkBoxClipDataSet* New();
75
77
82 void SetBoxClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
83 void SetBoxClip(const double* n0, const double* o0, const double* n1, const double* o1,
84 const double* n2, const double* o2, const double* n3, const double* o3, const double* n4,
85 const double* o4, const double* n5, const double* o5);
87
89
93 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
94 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
95 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
97
99
103 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
104 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
105 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
107
118
121 vtkUnstructuredGrid* GetClippedOutput();
122 virtual int GetNumberOfOutputs();
124
126
130 void SetLocator(vtkIncrementalPointLocator* locator);
131 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
133
138 void CreateDefaultLocator();
139
143 vtkMTimeType GetMTime() override;
144
146
150 vtkGetMacro(Orientation, unsigned int);
151 vtkSetMacro(Orientation, unsigned int);
153
154 static void InterpolateEdge(vtkDataSetAttributes* attributes, vtkIdType toId, vtkIdType fromId1,
155 vtkIdType fromId2, double t);
156
157 void MinEdgeF(const unsigned int* id_v, const vtkIdType* cellIds, unsigned int* edgF);
158 void PyramidToTetra(
159 const vtkIdType* pyramId, const vtkIdType* cellIds, vtkCellArray* newCellArray);
160 void WedgeToTetra(const vtkIdType* wedgeId, const vtkIdType* cellIds, vtkCellArray* newCellArray);
161 void CellGrid(
162 vtkIdType typeobj, vtkIdType npts, const vtkIdType* cellIds, vtkCellArray* newCellArray);
163 void CreateTetra(vtkIdType npts, const vtkIdType* cellIds, vtkCellArray* newCellArray);
164 void ClipBox(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
165 vtkCellArray* tets, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
166 vtkIdType cellId, vtkCellData* outCD);
167 void ClipHexahedron(vtkPoints* newPoints, vtkGenericCell* cell,
168 vtkIncrementalPointLocator* locator, vtkCellArray* tets, vtkPointData* inPD,
169 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
170 void ClipBoxInOut(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
171 vtkCellArray** tets, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
172 vtkIdType cellId, vtkCellData** outCD);
173 void ClipHexahedronInOut(vtkPoints* newPoints, vtkGenericCell* cell,
174 vtkIncrementalPointLocator* locator, vtkCellArray** tets, vtkPointData* inPD,
175 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
176
177 void ClipBox2D(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
178 vtkCellArray* tets, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
179 vtkIdType cellId, vtkCellData* outCD);
180 void ClipBoxInOut2D(vtkPoints* newPoints, vtkGenericCell* cell,
181 vtkIncrementalPointLocator* locator, vtkCellArray** tets, vtkPointData* inPD,
182 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
183 void ClipHexahedron2D(vtkPoints* newPoints, vtkGenericCell* cell,
184 vtkIncrementalPointLocator* locator, vtkCellArray* tets, vtkPointData* inPD,
185 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
186 void ClipHexahedronInOut2D(vtkPoints* newPoints, vtkGenericCell* cell,
187 vtkIncrementalPointLocator* locator, vtkCellArray** tets, vtkPointData* inPD,
188 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
189
190 void ClipBox1D(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
191 vtkCellArray* lines, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
192 vtkIdType cellId, vtkCellData* outCD);
193 void ClipBoxInOut1D(vtkPoints* newPoints, vtkGenericCell* cell,
194 vtkIncrementalPointLocator* locator, vtkCellArray** lines, vtkPointData* inPD,
195 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
196 void ClipHexahedron1D(vtkPoints* newPoints, vtkGenericCell* cell,
197 vtkIncrementalPointLocator* locator, vtkCellArray* lines, vtkPointData* inPD,
198 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
199 void ClipHexahedronInOut1D(vtkPoints* newPoints, vtkGenericCell* cell,
200 vtkIncrementalPointLocator* locator, vtkCellArray** lines, vtkPointData* inPD,
201 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
202
203 void ClipBox0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator, vtkCellArray* verts,
204 vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId,
205 vtkCellData* outCD);
206 void ClipBoxInOut0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
207 vtkCellArray** verts, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
208 vtkIdType cellId, vtkCellData** outCD);
209 void ClipHexahedron0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
210 vtkCellArray* verts, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
211 vtkIdType cellId, vtkCellData* outCD);
212 void ClipHexahedronInOut0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
213 vtkCellArray** verts, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
214 vtkIdType cellId, vtkCellData** outCD);
215
216 protected:
217 vtkBoxClipDataSet();
218 ~vtkBoxClipDataSet() override;
219
220 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
221 int FillInputPortInformation(int port, vtkInformation* info) override;
222
223 vtkIncrementalPointLocator* Locator;
224 vtkTypeBool GenerateClipScalars;
225
226 vtkTypeBool GenerateClippedOutput;
227
228 // double MergeTolerance;
229
230 double BoundBoxClip[3][2];
231 unsigned int Orientation;
232 double PlaneNormal[6][3]; // normal of each plane
233 double PlanePoint[6][3]; // point on the plane
234
235 private:
236 vtkBoxClipDataSet(const vtkBoxClipDataSet&) = delete;
237 void operator=(const vtkBoxClipDataSet&) = delete;
238 };
239
240 VTK_ABI_NAMESPACE_END
241 #endif
vtkBoxClipDataSet
clip an unstructured grid
Definition: vtkBoxClipDataSet.h:64
vtkBoxClipDataSet::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkBoxClipDataSet.h:223
vtkBoxClipDataSet::ClipBox2D
void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::ClipBoxInOut
void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkBoxClipDataSet::ClipHexahedron
void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::ClipHexahedron1D
void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::CellGrid
void CellGrid(vtkIdType typeobj, vtkIdType npts, const vtkIdType *cellIds, vtkCellArray *newCellArray)
vtkBoxClipDataSet::CreateTetra
void CreateTetra(vtkIdType npts, const vtkIdType *cellIds, vtkCellArray *newCellArray)
vtkBoxClipDataSet::ClipHexahedronInOut
void ClipHexahedronInOut(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::ClipBoxInOut1D
void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **lines, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::ClipHexahedronInOut2D
void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::New
static vtkBoxClipDataSet * New()
Constructor of the clipping box.
vtkBoxClipDataSet::GenerateClipScalars
vtkTypeBool GenerateClipScalars
Definition: vtkBoxClipDataSet.h:224
vtkBoxClipDataSet::ClipBoxInOut2D
void ClipBoxInOut2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::InterpolateEdge
static void InterpolateEdge(vtkDataSetAttributes *attributes, vtkIdType toId, vtkIdType fromId1, vtkIdType fromId2, double t)
vtkBoxClipDataSet::ClipHexahedronInOut0D
void ClipHexahedronInOut0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **verts, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::ClipBox1D
void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkBoxClipDataSet::~vtkBoxClipDataSet
~vtkBoxClipDataSet() override
vtkBoxClipDataSet::GenerateClippedOutput
vtkTypeBool GenerateClippedOutput
Definition: vtkBoxClipDataSet.h:226
vtkBoxClipDataSet::WedgeToTetra
void WedgeToTetra(const vtkIdType *wedgeId, const vtkIdType *cellIds, vtkCellArray *newCellArray)
vtkBoxClipDataSet::ClipBox0D
void ClipBox0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBoxClipDataSet::MinEdgeF
void MinEdgeF(const unsigned int *id_v, const vtkIdType *cellIds, unsigned int *edgF)
vtkBoxClipDataSet::ClipBoxInOut0D
void ClipBoxInOut0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **verts, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::ClipHexahedronInOut1D
void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **lines, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkBoxClipDataSet::ClipHexahedron0D
void ClipHexahedron0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::SetBoxClip
void SetBoxClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Specify the Box with which to perform the clipping.
vtkBoxClipDataSet::GetMTime
vtkMTimeType GetMTime() override
Return the mtime also considering the locator.
vtkBoxClipDataSet::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkBoxClipDataSet::ClipHexahedron2D
void ClipHexahedron2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkBoxClipDataSet::PyramidToTetra
void PyramidToTetra(const vtkIdType *pyramId, const vtkIdType *cellIds, vtkCellArray *newCellArray)
vtkBoxClipDataSet::GetNumberOfOutputs
virtual int GetNumberOfOutputs()
Set the tolerance for merging clip intersection points that are near the vertices of cells.
vtkBoxClipDataSet::GetClippedOutput
vtkUnstructuredGrid * GetClippedOutput()
Set the tolerance for merging clip intersection points that are near the vertices of cells.
vtkBoxClipDataSet::Orientation
unsigned int Orientation
Definition: vtkBoxClipDataSet.h:231
vtkBoxClipDataSet::vtkBoxClipDataSet
vtkBoxClipDataSet()
vtkBoxClipDataSet::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkBoxClipDataSet::SetBoxClip
void SetBoxClip(const double *n0, const double *o0, const double *n1, const double *o1, const double *n2, const double *o2, const double *n3, const double *o3, const double *n4, const double *o4, const double *n5, const double *o5)
Specify the Box with which to perform the clipping.
vtkBoxClipDataSet::ClipBox
void ClipBox(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:28
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:40
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:38
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:32
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:41
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
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:39
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:30
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
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
vtkUnstructuredGridAlgorithm.h