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 
57 class vtkCell3D;
58 class vtkCellArray;
59 class vtkCellData;
60 class vtkDataArray;
62 class vtkIdList;
63 class vtkGenericCell;
64 class vtkPointData;
66 class vtkPoints;
67 
68 class VTKFILTERSGENERAL_EXPORT vtkBoxClipDataSet : public vtkUnstructuredGridAlgorithm
69 {
70 public:
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,
190  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
191  vtkPointData *inPD, vtkPointData *outPD,
192  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
193  void ClipHexahedronInOut(vtkPoints *newPoints,vtkGenericCell *cell,
194  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
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,
204  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
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,
213  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
214  vtkPointData *inPD, vtkPointData *outPD,
215  vtkCellData *inCD,vtkIdType cellId,
216  vtkCellData **outCD);
217 
218  void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell,
219  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
220  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
221  vtkIdType cellId, vtkCellData *outCD);
222  void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
223  vtkIncrementalPointLocator *locator, vtkCellArray **lines,
224  vtkPointData *inPD, vtkPointData *outPD,
225  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
226  void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell,
227  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
228  vtkPointData *inPD, vtkPointData *outPD,
229  vtkCellData *inCD, vtkIdType cellId,
230  vtkCellData *outCD);
231  void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
232  vtkIncrementalPointLocator *locator, vtkCellArray **lines,
233  vtkPointData *inPD, vtkPointData *outPD,
234  vtkCellData *inCD, vtkIdType cellId,
235  vtkCellData **outCD);
236 
237  void ClipBox0D(vtkGenericCell *cell,
238  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
239  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
240  vtkIdType cellId, vtkCellData *outCD);
241  void ClipBoxInOut0D(vtkGenericCell *cell,
242  vtkIncrementalPointLocator *locator, vtkCellArray **verts,
243  vtkPointData *inPD, vtkPointData *outPD,
244  vtkCellData *inCD,
245  vtkIdType cellId, vtkCellData **outCD);
246  void ClipHexahedron0D(vtkGenericCell *cell,
247  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
248  vtkPointData *inPD, vtkPointData *outPD,
249  vtkCellData *inCD,
250  vtkIdType cellId, vtkCellData *outCD);
251  void ClipHexahedronInOut0D(vtkGenericCell *cell,
252  vtkIncrementalPointLocator *locator, vtkCellArray **verts,
253  vtkPointData *inPD, vtkPointData *outPD,
254  vtkCellData *inCD,
255  vtkIdType cellId, vtkCellData **outCD);
256 protected:
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 
275 private:
276  vtkBoxClipDataSet(const vtkBoxClipDataSet&) VTK_DELETE_FUNCTION;
277  void operator=(const vtkBoxClipDataSet&) VTK_DELETE_FUNCTION;
278 };
279 
280 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:38
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:59
vtkBoxClipDataSet::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkBoxClipDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkBoxClipDataSet::New
static vtkBoxClipDataSet * New()
Constructor of the clipping box.
vtkBoxClipDataSet::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:39
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkBoxClipDataSet
clip an unstructured grid
Definition: vtkBoxClipDataSet.h:69
vtkBoxClipDataSet::GetClippedOutput
vtkUnstructuredGrid * GetClippedOutput()
Set the tolerance for merging clip intersection points that are near the vertices of cells.
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkBoxClipDataSet::GetMTime
vtkMTimeType GetMTime() override
Return the mtime also considering the locator.
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:40
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
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.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:83
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)
vtkBoxClipDataSet::GetNumberOfOutputs
virtual int GetNumberOfOutputs()