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 
50 #ifndef __vtkBoxClipDataSet_h
51 #define __vtkBoxClipDataSet_h
52 
54 
55 class vtkCell3D;
56 class vtkCellArray;
57 class vtkCellData;
58 class vtkDataArray;
60 class vtkIdList;
61 class vtkGenericCell;
62 class vtkPointData;
64 class vtkPoints;
65 
67 {
68 public:
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
75  static vtkBoxClipDataSet *New();
76 
78 
81  void SetBoxClip(double xmin, double xmax,
82  double ymin, double ymax,
83  double zmin, double zmax);
84  void SetBoxClip(const double *n0, const double *o0,
85  const double *n1, const double *o1,
86  const double *n2, const double *o2,
87  const double *n3, const double *o3,
88  const double *n4, const double *o4,
89  const double *n5, const double *o5);
91 
92 
94 
96  vtkSetMacro(GenerateClipScalars,int);
97  vtkGetMacro(GenerateClipScalars,int);
98  vtkBooleanMacro(GenerateClipScalars,int);
100 
102 
104  vtkSetMacro(GenerateClippedOutput,int);
105  vtkGetMacro(GenerateClippedOutput,int);
106  vtkBooleanMacro(GenerateClippedOutput,int);
108 
118  vtkUnstructuredGrid *GetClippedOutput();
119  virtual int GetNumberOfOutputs();
121 
123 
125  void SetLocator(vtkIncrementalPointLocator *locator);
126  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
128 
131  void CreateDefaultLocator();
132 
134  unsigned long GetMTime();
135 
137 
139  vtkGetMacro(Orientation,unsigned int);
140  vtkSetMacro(Orientation,unsigned int);
142 
143 
144  static void InterpolateEdge(vtkDataSetAttributes *attributes,
145  vtkIdType toId,
146  vtkIdType fromId1, vtkIdType fromId2,
147  double t);
148 
149  void MinEdgeF(const unsigned int *id_v, const vtkIdType *cellIds,
150  unsigned int *edgF );
151  void PyramidToTetra(const vtkIdType *pyramId, const vtkIdType *cellIds,
152  vtkCellArray *newCellArray);
153  void WedgeToTetra(const vtkIdType *wedgeId, const vtkIdType *cellIds,
154  vtkCellArray *newCellArray);
155  void CellGrid(vtkIdType typeobj, vtkIdType npts, const vtkIdType *cellIds,
156  vtkCellArray *newCellArray);
157  void CreateTetra(vtkIdType npts, const vtkIdType *cellIds,
158  vtkCellArray *newCellArray);
159  void ClipBox(vtkPoints *newPoints,vtkGenericCell *cell,
161  vtkPointData *outPD,vtkCellData *inCD,vtkIdType cellId,
162  vtkCellData *outCD);
163  void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell,
165  vtkPointData *inPD, vtkPointData *outPD,
166  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD);
167  void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell,
168  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
169  vtkPointData *inPD, vtkPointData *outPD,
170  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
171  void ClipHexahedronInOut(vtkPoints *newPoints,vtkGenericCell *cell,
172  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
173  vtkPointData *inPD, vtkPointData *outPD,
174  vtkCellData *inCD, vtkIdType cellId,
175  vtkCellData **outCD);
176 
177  void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell,
178  vtkIncrementalPointLocator *locator, vtkCellArray *tets,
179  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
180  vtkIdType cellId, vtkCellData *outCD);
181  void ClipBoxInOut2D(vtkPoints *newPoints,vtkGenericCell *cell,
182  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
183  vtkPointData *inPD, vtkPointData *outPD,
184  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
185  void ClipHexahedron2D(vtkPoints *newPoints,vtkGenericCell *cell,
187  vtkPointData *inPD, vtkPointData *outPD,
188  vtkCellData *inCD, vtkIdType cellId,
189  vtkCellData *outCD);
190  void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell,
191  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
192  vtkPointData *inPD, vtkPointData *outPD,
193  vtkCellData *inCD,vtkIdType cellId,
194  vtkCellData **outCD);
195 
196  void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell,
197  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
198  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
199  vtkIdType cellId, vtkCellData *outCD);
200  void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
201  vtkIncrementalPointLocator *locator, vtkCellArray **lines,
202  vtkPointData *inPD, vtkPointData *outPD,
203  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
204  void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell,
205  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
206  vtkPointData *inPD, vtkPointData *outPD,
207  vtkCellData *inCD, vtkIdType cellId,
208  vtkCellData *outCD);
209  void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
210  vtkIncrementalPointLocator *locator, vtkCellArray **lines,
211  vtkPointData *inPD, vtkPointData *outPD,
212  vtkCellData *inCD, vtkIdType cellId,
213  vtkCellData **outCD);
214 
215  void ClipBox0D(vtkGenericCell *cell,
216  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
217  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
218  vtkIdType cellId, vtkCellData *outCD);
219  void ClipBoxInOut0D(vtkGenericCell *cell,
220  vtkIncrementalPointLocator *locator, vtkCellArray **verts,
221  vtkPointData *inPD, vtkPointData *outPD,
222  vtkCellData *inCD,
223  vtkIdType cellId, vtkCellData **outCD);
224  void ClipHexahedron0D(vtkGenericCell *cell,
225  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
226  vtkPointData *inPD, vtkPointData *outPD,
227  vtkCellData *inCD,
228  vtkIdType cellId, vtkCellData *outCD);
229  void ClipHexahedronInOut0D(vtkGenericCell *cell,
230  vtkIncrementalPointLocator *locator, vtkCellArray **verts,
231  vtkPointData *inPD, vtkPointData *outPD,
232  vtkCellData *inCD,
233  vtkIdType cellId, vtkCellData **outCD);
234 protected:
237 
240 
243 
245 
246  //double MergeTolerance;
247 
248  double BoundBoxClip[3][2];
249  unsigned int Orientation;
250  double PlaneNormal[6][3]; //normal of each plane
251  double PlanePoint[6][3]; //point on the plane
252 
253 private:
254  vtkBoxClipDataSet(const vtkBoxClipDataSet&); // Not implemented.
255  void operator=(const vtkBoxClipDataSet&); // Not implemented.
256 };
257 
258 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_GRAPHICS_EXPORT
represent and manipulate point attribute data
Definition: vtkPointData.h:35
Store vtkAlgorithm input/output information.
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
unsigned int Orientation
virtual int FillInputPortInformation(int port, vtkInformation *info)
int vtkIdType
Definition: vtkType.h:255
provides thread-safe access to cells
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:36
clip an unstructured grid
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void PrintSelf(ostream &os, vtkIndent indent)
represent and manipulate attribute data in a dataset
Superclass for algorithms that produce only unstructured grid as output.
object to represent cell connectivity
Definition: vtkCellArray.h:48
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38