VTK  9.1.0
vtkBoxClipDataSet.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBoxClipDataSet.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=========================================================================*/
15/*----------------------------------------------------------------------------
16 Copyright (c) Sandia Corporation
17 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18----------------------------------------------------------------------------*/
19
77#ifndef vtkBoxClipDataSet_h
78#define vtkBoxClipDataSet_h
79
80#include "vtkFiltersGeneralModule.h" // For export macro
82
83class vtkCell3D;
84class vtkCellArray;
85class vtkCellData;
86class vtkDataArray;
88class vtkIdList;
89class vtkGenericCell;
90class vtkPointData;
92class vtkPoints;
93
94class VTKFILTERSGENERAL_EXPORT vtkBoxClipDataSet : public vtkUnstructuredGridAlgorithm
95{
96public:
98 void PrintSelf(ostream& os, vtkIndent indent) override;
99
106
108
113 void SetBoxClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
114 void SetBoxClip(const double* n0, const double* o0, const double* n1, const double* o1,
115 const double* n2, const double* o2, const double* n3, const double* o3, const double* n4,
116 const double* o4, const double* n5, const double* o5);
118
120
124 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
125 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
126 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
128
130
134 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
135 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
136 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
138
149
153 virtual int GetNumberOfOutputs();
155
157
162 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
164
170
175
177
181 vtkGetMacro(Orientation, unsigned int);
182 vtkSetMacro(Orientation, unsigned int);
184
185 static void InterpolateEdge(vtkDataSetAttributes* attributes, vtkIdType toId, vtkIdType fromId1,
186 vtkIdType fromId2, double t);
187
188 void MinEdgeF(const unsigned int* id_v, const vtkIdType* cellIds, unsigned int* edgF);
190 const vtkIdType* pyramId, const vtkIdType* cellIds, vtkCellArray* newCellArray);
191 void WedgeToTetra(const vtkIdType* wedgeId, const vtkIdType* cellIds, vtkCellArray* newCellArray);
193 vtkIdType typeobj, vtkIdType npts, const vtkIdType* cellIds, vtkCellArray* newCellArray);
194 void CreateTetra(vtkIdType npts, const vtkIdType* cellIds, vtkCellArray* newCellArray);
196 vtkCellArray* tets, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
197 vtkIdType cellId, vtkCellData* outCD);
200 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
202 vtkCellArray** tets, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
203 vtkIdType cellId, vtkCellData** outCD);
206 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
207
209 vtkCellArray* tets, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
210 vtkIdType cellId, vtkCellData* outCD);
213 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
216 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
219 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
220
222 vtkCellArray* lines, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
223 vtkIdType cellId, vtkCellData* outCD);
226 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
229 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
232 vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
233
235 vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId,
236 vtkCellData* outCD);
238 vtkCellArray** verts, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
239 vtkIdType cellId, vtkCellData** outCD);
241 vtkCellArray* verts, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
242 vtkIdType cellId, vtkCellData* outCD);
244 vtkCellArray** verts, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
245 vtkIdType cellId, vtkCellData** outCD);
246
247protected:
250
252 int FillInputPortInformation(int port, vtkInformation* info) override;
253
256
258
259 // double MergeTolerance;
260
261 double BoundBoxClip[3][2];
262 unsigned int Orientation;
263 double PlaneNormal[6][3]; // normal of each plane
264 double PlanePoint[6][3]; // point on the plane
265
266private:
267 vtkBoxClipDataSet(const vtkBoxClipDataSet&) = delete;
268 void operator=(const vtkBoxClipDataSet&) = delete;
269};
270
271#endif
clip an unstructured grid
vtkIncrementalPointLocator * Locator
static vtkBoxClipDataSet * New()
Constructor of the clipping box.
void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
void CreateDefaultLocator()
Create default locator.
void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
vtkUnstructuredGrid * GetClippedOutput()
Set the tolerance for merging clip intersection points that are near the vertices of cells.
void CellGrid(vtkIdType typeobj, vtkIdType npts, const vtkIdType *cellIds, vtkCellArray *newCellArray)
void CreateTetra(vtkIdType npts, const vtkIdType *cellIds, vtkCellArray *newCellArray)
void ClipHexahedronInOut(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **lines, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
vtkTypeBool GenerateClipScalars
void ClipBoxInOut2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **tets, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
static void InterpolateEdge(vtkDataSetAttributes *attributes, vtkIdType toId, vtkIdType fromId1, vtkIdType fromId2, double t)
void ClipHexahedronInOut0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **verts, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *lines, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
~vtkBoxClipDataSet() override
vtkTypeBool GenerateClippedOutput
void WedgeToTetra(const vtkIdType *wedgeId, const vtkIdType *cellIds, vtkCellArray *newCellArray)
void ClipBox0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void MinEdgeF(const unsigned int *id_v, const vtkIdType *cellIds, unsigned int *edgF)
void ClipBoxInOut0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **verts, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray **lines, vtkPointData *inPD, vtkPointData **outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD)
void ClipHexahedron0D(vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
void SetBoxClip(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Specify the Box with which to perform the clipping.
vtkMTimeType GetMTime() override
Return the mtime also considering the locator.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void ClipHexahedron2D(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
void PyramidToTetra(const vtkIdType *pyramId, const vtkIdType *cellIds, vtkCellArray *newCellArray)
virtual int GetNumberOfOutputs()
Set the tolerance for merging clip intersection points that are near the vertices of cells.
unsigned int Orientation
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
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.
void ClipBox(vtkPoints *newPoints, vtkGenericCell *cell, vtkIncrementalPointLocator *locator, vtkCellArray *tets, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD)
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:40
object to represent cell connectivity
Definition: vtkCellArray.h:290
represent and manipulate cell attribute data
Definition: vtkCellData.h:142
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
represent and manipulate attribute data in a dataset
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:140
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:142
represent and manipulate 3D points
Definition: vtkPoints.h:143
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287