VTK  9.2.6
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, double ymin, double ymax, double zmin, double zmax);
88  void SetBoxClip(const double* n0, const double* o0, const double* n1, const double* o1,
89  const double* n2, const double* o2, const double* n3, const double* o3, const double* n4,
90  const double* o4, const double* n5, const double* o5);
92 
94 
98  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
99  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
100  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
102 
104 
108  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
109  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
110  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
112 
122 
126  vtkUnstructuredGrid* GetClippedOutput();
127  virtual int GetNumberOfOutputs();
129 
131 
135  void SetLocator(vtkIncrementalPointLocator* locator);
136  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
138 
143  void CreateDefaultLocator();
144 
148  vtkMTimeType GetMTime() override;
149 
151 
155  vtkGetMacro(Orientation, unsigned int);
156  vtkSetMacro(Orientation, unsigned int);
158 
159  static void InterpolateEdge(vtkDataSetAttributes* attributes, vtkIdType toId, vtkIdType fromId1,
160  vtkIdType fromId2, double t);
161 
162  void MinEdgeF(const unsigned int* id_v, const vtkIdType* cellIds, unsigned int* edgF);
163  void PyramidToTetra(
164  const vtkIdType* pyramId, const vtkIdType* cellIds, vtkCellArray* newCellArray);
165  void WedgeToTetra(const vtkIdType* wedgeId, const vtkIdType* cellIds, vtkCellArray* newCellArray);
166  void CellGrid(
167  vtkIdType typeobj, vtkIdType npts, const vtkIdType* cellIds, vtkCellArray* newCellArray);
168  void CreateTetra(vtkIdType npts, const vtkIdType* cellIds, vtkCellArray* newCellArray);
169  void ClipBox(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
170  vtkCellArray* tets, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
171  vtkIdType cellId, vtkCellData* outCD);
172  void ClipHexahedron(vtkPoints* newPoints, vtkGenericCell* cell,
174  vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
175  void ClipBoxInOut(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
176  vtkCellArray** tets, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
177  vtkIdType cellId, vtkCellData** outCD);
178  void ClipHexahedronInOut(vtkPoints* newPoints, vtkGenericCell* cell,
179  vtkIncrementalPointLocator* locator, vtkCellArray** tets, vtkPointData* inPD,
180  vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
181 
182  void ClipBox2D(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
183  vtkCellArray* tets, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
184  vtkIdType cellId, vtkCellData* outCD);
185  void ClipBoxInOut2D(vtkPoints* newPoints, vtkGenericCell* cell,
186  vtkIncrementalPointLocator* locator, vtkCellArray** tets, vtkPointData* inPD,
187  vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
188  void ClipHexahedron2D(vtkPoints* newPoints, vtkGenericCell* cell,
190  vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
191  void ClipHexahedronInOut2D(vtkPoints* newPoints, vtkGenericCell* cell,
192  vtkIncrementalPointLocator* locator, vtkCellArray** tets, vtkPointData* inPD,
193  vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
194 
195  void ClipBox1D(vtkPoints* newPoints, vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
196  vtkCellArray* lines, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
197  vtkIdType cellId, vtkCellData* outCD);
198  void ClipBoxInOut1D(vtkPoints* newPoints, vtkGenericCell* cell,
199  vtkIncrementalPointLocator* locator, vtkCellArray** lines, vtkPointData* inPD,
200  vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
201  void ClipHexahedron1D(vtkPoints* newPoints, vtkGenericCell* cell,
202  vtkIncrementalPointLocator* locator, vtkCellArray* lines, vtkPointData* inPD,
203  vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD);
204  void ClipHexahedronInOut1D(vtkPoints* newPoints, vtkGenericCell* cell,
205  vtkIncrementalPointLocator* locator, vtkCellArray** lines, vtkPointData* inPD,
206  vtkPointData** outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData** outCD);
207 
208  void ClipBox0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator, vtkCellArray* verts,
209  vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId,
210  vtkCellData* outCD);
211  void ClipBoxInOut0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
212  vtkCellArray** verts, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
213  vtkIdType cellId, vtkCellData** outCD);
214  void ClipHexahedron0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
215  vtkCellArray* verts, vtkPointData* inPD, vtkPointData* outPD, vtkCellData* inCD,
216  vtkIdType cellId, vtkCellData* outCD);
217  void ClipHexahedronInOut0D(vtkGenericCell* cell, vtkIncrementalPointLocator* locator,
218  vtkCellArray** verts, vtkPointData* inPD, vtkPointData** outPD, vtkCellData* inCD,
219  vtkIdType cellId, vtkCellData** outCD);
220 
221 protected:
223  ~vtkBoxClipDataSet() override;
224 
226  int FillInputPortInformation(int port, vtkInformation* info) override;
227 
230 
232 
233  // double MergeTolerance;
234 
235  double BoundBoxClip[3][2];
236  unsigned int Orientation;
237  double PlaneNormal[6][3]; // normal of each plane
238  double PlanePoint[6][3]; // point on the plane
239 
240 private:
241  vtkBoxClipDataSet(const vtkBoxClipDataSet&) = delete;
242  void operator=(const vtkBoxClipDataSet&) = delete;
243 };
244 
245 #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:41
vtkTypeBool GenerateClippedOutput
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
represent and manipulate cell attribute data
Definition: vtkCellData.h:41
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
unsigned int Orientation
int vtkIdType
Definition: vtkType.h:332
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:33
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
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:186
vtkIncrementalPointLocator * Locator
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:39