VTK
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
51#ifndef vtkBoxClipDataSet_h
52#define vtkBoxClipDataSet_h
53
54#include "vtkFiltersGeneralModule.h" // For export macro
56
57class vtkCell3D;
58class vtkCellArray;
59class vtkCellData;
60class vtkDataArray;
62class vtkIdList;
63class vtkGenericCell;
64class vtkPointData;
66class vtkPoints;
67
68class VTKFILTERSGENERAL_EXPORT vtkBoxClipDataSet : public vtkUnstructuredGridAlgorithm
69{
70public:
72 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
73
80
82
87 void SetBoxClip(double xmin, double xmax,
88 double ymin, double ymax,
89 double zmin, double zmax);
90 void SetBoxClip(const double *n0, const double *o0,
91 const double *n1, const double *o1,
92 const double *n2, const double *o2,
93 const double *n3, const double *o3,
94 const double *n4, const double *o4,
95 const double *n5, const double *o5);
97
98
100
104 vtkSetMacro(GenerateClipScalars,int);
105 vtkGetMacro(GenerateClipScalars,int);
106 vtkBooleanMacro(GenerateClipScalars,int);
108
110
114 vtkSetMacro(GenerateClippedOutput,int);
115 vtkGetMacro(GenerateClippedOutput,int);
116 vtkBooleanMacro(GenerateClippedOutput,int);
118
133 virtual int GetNumberOfOutputs();
135
137
142 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
144
150
154 vtkMTimeType GetMTime() VTK_OVERRIDE;
155
157
161 vtkGetMacro(Orientation,unsigned int);
162 vtkSetMacro(Orientation,unsigned int);
164
165
166 static void InterpolateEdge(vtkDataSetAttributes *attributes,
167 vtkIdType toId,
168 vtkIdType fromId1, vtkIdType fromId2,
169 double t);
170
171 void MinEdgeF(const unsigned int *id_v, const vtkIdType *cellIds,
172 unsigned int *edgF );
173 void PyramidToTetra(const vtkIdType *pyramId, const vtkIdType *cellIds,
174 vtkCellArray *newCellArray);
175 void WedgeToTetra(const vtkIdType *wedgeId, const vtkIdType *cellIds,
176 vtkCellArray *newCellArray);
177 void CellGrid(vtkIdType typeobj, vtkIdType npts, const vtkIdType *cellIds,
178 vtkCellArray *newCellArray);
179 void CreateTetra(vtkIdType npts, const vtkIdType *cellIds,
180 vtkCellArray *newCellArray);
181 void ClipBox(vtkPoints *newPoints,vtkGenericCell *cell,
183 vtkPointData *outPD,vtkCellData *inCD,vtkIdType cellId,
184 vtkCellData *outCD);
185 void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell,
187 vtkPointData *inPD, vtkPointData *outPD,
188 vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD);
189 void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell,
191 vtkPointData *inPD, vtkPointData *outPD,
192 vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
193 void ClipHexahedronInOut(vtkPoints *newPoints,vtkGenericCell *cell,
195 vtkPointData *inPD, vtkPointData *outPD,
196 vtkCellData *inCD, vtkIdType cellId,
197 vtkCellData **outCD);
198
199 void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell,
201 vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
202 vtkIdType cellId, vtkCellData *outCD);
203 void ClipBoxInOut2D(vtkPoints *newPoints,vtkGenericCell *cell,
205 vtkPointData *inPD, vtkPointData *outPD,
206 vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
207 void ClipHexahedron2D(vtkPoints *newPoints,vtkGenericCell *cell,
209 vtkPointData *inPD, vtkPointData *outPD,
210 vtkCellData *inCD, vtkIdType cellId,
211 vtkCellData *outCD);
212 void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell,
214 vtkPointData *inPD, vtkPointData *outPD,
215 vtkCellData *inCD,vtkIdType cellId,
216 vtkCellData **outCD);
217
218 void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell,
220 vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
221 vtkIdType cellId, vtkCellData *outCD);
222 void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
224 vtkPointData *inPD, vtkPointData *outPD,
225 vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
226 void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell,
228 vtkPointData *inPD, vtkPointData *outPD,
229 vtkCellData *inCD, vtkIdType cellId,
230 vtkCellData *outCD);
231 void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
233 vtkPointData *inPD, vtkPointData *outPD,
234 vtkCellData *inCD, vtkIdType cellId,
235 vtkCellData **outCD);
236
237 void ClipBox0D(vtkGenericCell *cell,
239 vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
240 vtkIdType cellId, vtkCellData *outCD);
241 void ClipBoxInOut0D(vtkGenericCell *cell,
243 vtkPointData *inPD, vtkPointData *outPD,
244 vtkCellData *inCD,
245 vtkIdType cellId, vtkCellData **outCD);
246 void ClipHexahedron0D(vtkGenericCell *cell,
248 vtkPointData *inPD, vtkPointData *outPD,
249 vtkCellData *inCD,
250 vtkIdType cellId, vtkCellData *outCD);
251 void ClipHexahedronInOut0D(vtkGenericCell *cell,
253 vtkPointData *inPD, vtkPointData *outPD,
254 vtkCellData *inCD,
255 vtkIdType cellId, vtkCellData **outCD);
256protected:
258 ~vtkBoxClipDataSet() VTK_OVERRIDE;
259
260 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
261 int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
262
264 int GenerateClipScalars;
265
266 int GenerateClippedOutput;
267
268 //double MergeTolerance;
269
270 double BoundBoxClip[3][2];
271 unsigned int Orientation;
272 double PlaneNormal[6][3]; //normal of each plane
273 double PlanePoint[6][3]; //point on the plane
274
275private:
276 vtkBoxClipDataSet(const vtkBoxClipDataSet&) VTK_DELETE_FUNCTION;
277 void operator=(const vtkBoxClipDataSet&) VTK_DELETE_FUNCTION;
278};
279
280#endif
clip an unstructured grid
static vtkBoxClipDataSet * New()
Constructor of the clipping box.
void CreateDefaultLocator()
Create default locator.
vtkUnstructuredGrid * GetClippedOutput()
Set the tolerance for merging clip intersection points that are near the vertices of cells.
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.
virtual int GetNumberOfOutputs()
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)
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:39
object to represent cell connectivity
Definition: vtkCellArray.h:51
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
represent and manipulate attribute data in a dataset
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:37
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
Definition: vtkPointData.h:38
represent and manipulate 3D points
Definition: vtkPoints.h:40
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248