VTK  9.2.6
vtkHyperTreeGridPlaneCutter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperTreeGridPlaneCutter.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 =========================================================================*/
43 #ifndef vtkHyperTreeGridPlaneCutter_h
44 #define vtkHyperTreeGridPlaneCutter_h
45 
46 #include "vtkFiltersHyperTreeModule.h" // For export macro
48 
49 class vtkCellArray;
50 class vtkCutter;
51 class vtkIdList;
52 class vtkPoints;
55 
56 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridPlaneCutter : public vtkHyperTreeGridAlgorithm
57 {
58 public:
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
68  void SetPlane(double a, double b, double c, double d);
69  vtkGetVector4Macro(Plane, double);
71 
73 
77  vtkGetMacro(AxisAlignment, int);
79 
81 
84  bool IsPlaneOrthogonalToXAxis() { return this->AxisAlignment == 0; }
85  bool IsPlaneOrthogonalToYAxis() { return this->AxisAlignment == 1; }
86  bool IsPlaneOrthogonalToZAxis() { return this->AxisAlignment == 2; }
87  //}@
88 
90 
93  vtkSetMacro(Dual, int);
94  vtkGetMacro(Dual, int);
95  vtkBooleanMacro(Dual, int);
97 
98 protected:
100  ~vtkHyperTreeGridPlaneCutter() override;
101 
105  virtual void Reset();
106 
110  int FillOutputPortInformation(int, vtkInformation*) override;
111 
116 
120  void RecursivelyProcessTreePrimal(vtkHyperTreeGridNonOrientedGeometryCursor*);
121 
125  bool RecursivelyPreProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor*);
126 
130  void RecursivelyProcessTreeDual(vtkHyperTreeGridNonOrientedMooreSuperCursor*);
131 
135  bool CheckIntersection(double[8][3], double[8]);
136 
137  // Check if a cursor is intersected by a plane.
138  // Don't return function evaluations
139  bool CheckIntersection(double[8][3]);
140 
144  void PlaneCut(int, int, double[8][3], int&, double[][3]);
145 
149  void ReorderCutPoints(int, double[][3]);
150 
154  double Plane[4];
155 
159  int Dual;
160 
165 
170 
175 
180 
185 
190 
195 
200 
201 private:
203  void operator=(const vtkHyperTreeGridPlaneCutter&) = delete;
204 };
205 
206 #endif /* vtkHyperTreeGridPlaneCutter_h */
vtkIdList * Leaves
Storage for dual vertex indices.
bool IsPlaneOrthogonalToZAxis()
Returns true if plane's normal is aligned with the corresponding axis, false elsewise.
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:73
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed in dual mode.
cut an hyper tree grid volume with a plane and generate a polygonal cut surface.
int FillOutputPortInformation(int, vtkInformation *) override
Define default input and output port types.
Store vtkAlgorithm input/output information.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
vtkCutter * Cutter
Cutter to be used on dual cells.
vtkPoints * Points
Storage for points of output unstructured mesh.
vtkPoints * Centers
Storage for dual vertices at center of primal cells.
bool IsPlaneOrthogonalToYAxis()
Returns true if plane's normal is aligned with the corresponding axis, false elsewise.
vtkBitArray * InMask
material Mask
int AxisAlignment
Flag computed at plane creation to know wether it is aligned with x, y or z axis. ...
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
list of point or cell ids
Definition: vtkIdList.h:33
int Dual
Decide whether output mesh should be a computed on dual grid.
object to represent cell connectivity
Definition: vtkCellArray.h:186
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
bool IsPlaneOrthogonalToXAxis()
Returns true if plane's normal is aligned with the corresponding axis, false elsewise.
Superclass for algorithms that produce a hyper tree grid as output.
vtkCellArray * Cells
Storage for cells of output unstructured mesh.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:65
represent and manipulate 3D points
Definition: vtkPoints.h:39
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...