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) override;
73 
79  static vtkBoxClipDataSet *New();
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,vtkTypeBool);
105  vtkGetMacro(GenerateClipScalars,vtkTypeBool);
106  vtkBooleanMacro(GenerateClipScalars,vtkTypeBool);
108 
110 
114  vtkSetMacro(GenerateClippedOutput,vtkTypeBool);
115  vtkGetMacro(GenerateClippedOutput,vtkTypeBool);
116  vtkBooleanMacro(GenerateClippedOutput,vtkTypeBool);
118 
132  vtkUnstructuredGrid *GetClippedOutput();
133  virtual int GetNumberOfOutputs();
135 
137 
141  void SetLocator(vtkIncrementalPointLocator *locator);
142  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
144 
149  void CreateDefaultLocator();
150 
154  vtkMTimeType GetMTime() 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() override;
259 
261  int FillInputPortInformation(int port, vtkInformation *info) override;
262 
265 
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&) = delete;
277  void operator=(const vtkBoxClipDataSet&) = delete;
278 };
279 
280 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkTypeBool GenerateClippedOutput
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
unsigned int Orientation
int vtkIdType
Definition: vtkType.h:347
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
provides thread-safe access to cells
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
clip an unstructured grid
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:36
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTypeBool GenerateClipScalars
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:50
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:39