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 
53 #include "vtkFiltersGeneralModule.h" // For export macro
55 
56 class vtkCell3D;
57 class vtkCellArray;
58 class vtkCellData;
59 class vtkDataArray;
61 class vtkIdList;
62 class vtkGenericCell;
63 class vtkPointData;
65 class vtkPoints;
66 
68 {
69 public:
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
76  static vtkBoxClipDataSet *New();
77 
79 
82  void SetBoxClip(double xmin, double xmax,
83  double ymin, double ymax,
84  double zmin, double zmax);
85  void SetBoxClip(const double *n0, const double *o0,
86  const double *n1, const double *o1,
87  const double *n2, const double *o2,
88  const double *n3, const double *o3,
89  const double *n4, const double *o4,
90  const double *n5, const double *o5);
92 
93 
95 
97  vtkSetMacro(GenerateClipScalars,int);
98  vtkGetMacro(GenerateClipScalars,int);
99  vtkBooleanMacro(GenerateClipScalars,int);
101 
103 
105  vtkSetMacro(GenerateClippedOutput,int);
106  vtkGetMacro(GenerateClippedOutput,int);
107  vtkBooleanMacro(GenerateClippedOutput,int);
109 
119  vtkUnstructuredGrid *GetClippedOutput();
120  virtual int GetNumberOfOutputs();
122 
124 
126  void SetLocator(vtkIncrementalPointLocator *locator);
127  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
129 
132  void CreateDefaultLocator();
133 
135  unsigned long GetMTime();
136 
138 
140  vtkGetMacro(Orientation,unsigned int);
141  vtkSetMacro(Orientation,unsigned int);
143 
144 
145  static void InterpolateEdge(vtkDataSetAttributes *attributes,
146  vtkIdType toId,
147  vtkIdType fromId1, vtkIdType fromId2,
148  double t);
149 
150  void MinEdgeF(const unsigned int *id_v, const vtkIdType *cellIds,
151  unsigned int *edgF );
152  void PyramidToTetra(const vtkIdType *pyramId, const vtkIdType *cellIds,
153  vtkCellArray *newCellArray);
154  void WedgeToTetra(const vtkIdType *wedgeId, const vtkIdType *cellIds,
155  vtkCellArray *newCellArray);
156  void CellGrid(vtkIdType typeobj, vtkIdType npts, const vtkIdType *cellIds,
157  vtkCellArray *newCellArray);
158  void CreateTetra(vtkIdType npts, const vtkIdType *cellIds,
159  vtkCellArray *newCellArray);
160  void ClipBox(vtkPoints *newPoints,vtkGenericCell *cell,
162  vtkPointData *outPD,vtkCellData *inCD,vtkIdType cellId,
163  vtkCellData *outCD);
164  void ClipHexahedron(vtkPoints *newPoints, vtkGenericCell *cell,
166  vtkPointData *inPD, vtkPointData *outPD,
167  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD);
168  void ClipBoxInOut(vtkPoints *newPoints, vtkGenericCell *cell,
169  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
170  vtkPointData *inPD, vtkPointData *outPD,
171  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
172  void ClipHexahedronInOut(vtkPoints *newPoints,vtkGenericCell *cell,
173  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
174  vtkPointData *inPD, vtkPointData *outPD,
175  vtkCellData *inCD, vtkIdType cellId,
176  vtkCellData **outCD);
177 
178  void ClipBox2D(vtkPoints *newPoints, vtkGenericCell *cell,
180  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
181  vtkIdType cellId, vtkCellData *outCD);
182  void ClipBoxInOut2D(vtkPoints *newPoints,vtkGenericCell *cell,
183  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
184  vtkPointData *inPD, vtkPointData *outPD,
185  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
186  void ClipHexahedron2D(vtkPoints *newPoints,vtkGenericCell *cell,
188  vtkPointData *inPD, vtkPointData *outPD,
189  vtkCellData *inCD, vtkIdType cellId,
190  vtkCellData *outCD);
191  void ClipHexahedronInOut2D(vtkPoints *newPoints, vtkGenericCell *cell,
192  vtkIncrementalPointLocator *locator, vtkCellArray **tets,
193  vtkPointData *inPD, vtkPointData *outPD,
194  vtkCellData *inCD,vtkIdType cellId,
195  vtkCellData **outCD);
196 
197  void ClipBox1D(vtkPoints *newPoints, vtkGenericCell *cell,
198  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
199  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
200  vtkIdType cellId, vtkCellData *outCD);
201  void ClipBoxInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
202  vtkIncrementalPointLocator *locator, vtkCellArray **lines,
203  vtkPointData *inPD, vtkPointData *outPD,
204  vtkCellData *inCD, vtkIdType cellId, vtkCellData **outCD);
205  void ClipHexahedron1D(vtkPoints *newPoints, vtkGenericCell *cell,
206  vtkIncrementalPointLocator *locator, vtkCellArray *lines,
207  vtkPointData *inPD, vtkPointData *outPD,
208  vtkCellData *inCD, vtkIdType cellId,
209  vtkCellData *outCD);
210  void ClipHexahedronInOut1D(vtkPoints *newPoints, vtkGenericCell *cell,
211  vtkIncrementalPointLocator *locator, vtkCellArray **lines,
212  vtkPointData *inPD, vtkPointData *outPD,
213  vtkCellData *inCD, vtkIdType cellId,
214  vtkCellData **outCD);
215 
216  void ClipBox0D(vtkGenericCell *cell,
217  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
218  vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD,
219  vtkIdType cellId, vtkCellData *outCD);
220  void ClipBoxInOut0D(vtkGenericCell *cell,
221  vtkIncrementalPointLocator *locator, vtkCellArray **verts,
222  vtkPointData *inPD, vtkPointData *outPD,
223  vtkCellData *inCD,
224  vtkIdType cellId, vtkCellData **outCD);
225  void ClipHexahedron0D(vtkGenericCell *cell,
226  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
227  vtkPointData *inPD, vtkPointData *outPD,
228  vtkCellData *inCD,
229  vtkIdType cellId, vtkCellData *outCD);
230  void ClipHexahedronInOut0D(vtkGenericCell *cell,
231  vtkIncrementalPointLocator *locator, vtkCellArray **verts,
232  vtkPointData *inPD, vtkPointData *outPD,
233  vtkCellData *inCD,
234  vtkIdType cellId, vtkCellData **outCD);
235 protected:
238 
241 
244 
246 
247  //double MergeTolerance;
248 
249  double BoundBoxClip[3][2];
250  unsigned int Orientation;
251  double PlaneNormal[6][3]; //normal of each plane
252  double PlanePoint[6][3]; //point on the plane
253 
254 private:
255  vtkBoxClipDataSet(const vtkBoxClipDataSet&); // Not implemented.
256  void operator=(const vtkBoxClipDataSet&); // Not implemented.
257 };
258 
259 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
represent and manipulate point attribute data
Definition: vtkPointData.h:36
Store vtkAlgorithm input/output information.
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
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:275
provides thread-safe access to cells
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
clip an unstructured grid
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKFILTERSGENERAL_EXPORT
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:49
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38