VTK
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 =========================================================================*/
40 #ifndef vtkHyperTreeGridPlaneCutter_h
41 #define vtkHyperTreeGridPlaneCutter_h
42 
43 #include "vtkFiltersHyperTreeModule.h" // For export macro
45 
46 class vtkCellArray;
47 class vtkCutter;
48 class vtkIdList;
49 class vtkPoints;
52 
53 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridPlaneCutter : public vtkHyperTreeGridAlgorithm
54 {
55 public:
58  void PrintSelf(ostream&, vtkIndent) override;
59 
61 
65  void SetPlane(double a, double b, double c, double d);
66  vtkGetVector4Macro(Plane, double);
68 
70 
74  vtkGetMacro(AxisAlignment, int);
76 
78 
81  bool IsPlaneOrthogonalToXAxis() { return this->AxisAlignment == 0; }
82  bool IsPlaneOrthogonalToYAxis() { return this->AxisAlignment == 1; }
83  bool IsPlaneOrthogonalToZAxis() { return this->AxisAlignment == 2; }
84  //}@
85 
87 
90  vtkSetMacro(Dual, int);
91  vtkGetMacro(Dual, int);
92  vtkBooleanMacro(Dual, int);
94 
95 protected:
97  ~vtkHyperTreeGridPlaneCutter() override;
98 
102  virtual void Reset();
103 
107  int FillOutputPortInformation(int, vtkInformation*) override;
108 
113 
117  void RecursivelyProcessTreePrimal(vtkHyperTreeGridNonOrientedGeometryCursor*);
118 
122  bool RecursivelyPreProcessTree(vtkHyperTreeGridNonOrientedGeometryCursor*);
123 
127  void RecursivelyProcessTreeDual(vtkHyperTreeGridNonOrientedMooreSuperCursor*);
128 
132  bool CheckIntersection(double[8][3], double[8]);
133 
134  // Check if a cursor is intersected by a plane.
135  // Don't return function evaluations
136  bool CheckIntersection(double[8][3]);
137 
141  void PlaneCut(int, int, double[8][3], int&, double[][3]);
142 
146  void ReorderCutPoints(int, double[][3]);
147 
151  double Plane[4];
152 
156  int Dual;
157 
162 
167 
172 
177 
182 
187 
192 
197 
198 private:
200  void operator=(const vtkHyperTreeGridPlaneCutter&) = delete;
201 };
202 
203 #endif /* vtkHyperTreeGridPlaneCutter_h */
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkHyperTreeGridPlaneCutter::Dual
int Dual
Decide whether output mesh should be a computed on dual grid.
Definition: vtkHyperTreeGridPlaneCutter.h:156
vtkHyperTreeGridNonOrientedGeometryCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedGeometryCursor.h:56
vtkHyperTreeGridPlaneCutter
cut an hyper tree grid volume with a plane and generate a polygonal cut surface.
Definition: vtkHyperTreeGridPlaneCutter.h:53
vtkHyperTreeGridNonOrientedMooreSuperCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedMooreSuperCursor.h:48
vtkCutter
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:63
vtkHyperTreeGridPlaneCutter::Cells
vtkCellArray * Cells
Storage for cells of output unstructured mesh.
Definition: vtkHyperTreeGridPlaneCutter.h:171
vtkHyperTreeGridAlgorithm::ProcessTrees
virtual int ProcessTrees(vtkHyperTreeGrid *, vtkDataObject *)=0
Main routine to process individual trees in the grid This is pure virtual method to be implemented by...
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridPlaneCutter::IsPlaneOrthogonalToXAxis
bool IsPlaneOrthogonalToXAxis()
Returns true if plane's normal is aligned with the corresponding axis, false elsewise.
Definition: vtkHyperTreeGridPlaneCutter.h:81
vtkHyperTreeGridPlaneCutter::Centers
vtkPoints * Centers
Storage for dual vertices at center of primal cells.
Definition: vtkHyperTreeGridPlaneCutter.h:181
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkHyperTreeGridPlaneCutter::Points
vtkPoints * Points
Storage for points of output unstructured mesh.
Definition: vtkHyperTreeGridPlaneCutter.h:166
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:179
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:64
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridPlaneCutter::Leaves
vtkIdList * Leaves
Storage for dual vertex indices.
Definition: vtkHyperTreeGridPlaneCutter.h:176
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkHyperTreeGridPlaneCutter::IsPlaneOrthogonalToZAxis
bool IsPlaneOrthogonalToZAxis()
Definition: vtkHyperTreeGridPlaneCutter.h:83
vtkHyperTreeGridPlaneCutter::InMask
vtkBitArray * InMask
material Mask
Definition: vtkHyperTreeGridPlaneCutter.h:191
vtkHyperTreeGridPlaneCutter::Cutter
vtkCutter * Cutter
Cutter to be used on dual cells.
Definition: vtkHyperTreeGridPlaneCutter.h:186
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkHyperTreeGridPlaneCutter::AxisAlignment
int AxisAlignment
Flag computed at plane creation to know wether it is aligned with x, y or z axis.
Definition: vtkHyperTreeGridPlaneCutter.h:196
vtkHyperTreeGridPlaneCutter::SelectedCells
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed in dual mode.
Definition: vtkHyperTreeGridPlaneCutter.h:161
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkHyperTreeGridAlgorithm
Superclass for algorithms that produce a hyper tree grid as output.
Definition: vtkHyperTreeGridAlgorithm.h:47
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:96
vtkHyperTreeGridPlaneCutter::IsPlaneOrthogonalToYAxis
bool IsPlaneOrthogonalToYAxis()
Definition: vtkHyperTreeGridPlaneCutter.h:82