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 =========================================================================*/
46 #ifndef vtkHyperTreeGridPlaneCutter_h
47 #define vtkHyperTreeGridPlaneCutter_h
48 
49 #include "vtkFiltersHyperTreeModule.h" // For export macro
51 
53 class vtkCellArray;
54 class vtkCutter;
55 class vtkIdList;
56 class vtkPoints;
57 
58 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridPlaneCutter : public vtkHyperTreeGridAlgorithm
59 {
60 public:
63  void PrintSelf( ostream&, vtkIndent ) override;
64 
66 
70  vtkSetVector4Macro(Plane,double);
71  vtkGetVector4Macro(Plane,double);
73 
75 
78  vtkSetMacro(Dual,int);
79  vtkGetMacro(Dual,int);
80  vtkBooleanMacro(Dual,int);
82 
83 protected:
85  ~vtkHyperTreeGridPlaneCutter() override;
86 
90  int FillOutputPortInformation( int, vtkInformation* ) override;
91 
95  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
96 
100  void RecursivelyProcessTreePrimal( vtkHyperTreeGridCursor*, vtkBitArray* );
101 
105  bool RecursivelyPreProcessTree( vtkHyperTreeGridCursor*, vtkBitArray* );
106 
110  void RecursivelyProcessTreeDual( vtkHyperTreeGridCursor*, vtkBitArray* );
111 
115  bool CheckIntersection( double[8][3], double[8] );
116 
117  // Check if a cursor is intersected by a plane.
118  // Don't return function evaluations
119  bool CheckIntersection( double[8][3] );
120 
124  void PlaneCut( int, int, double[8][3], int&, double[][3] );
125 
129  void ReorderCutPoints( int, double[][3] );
130 
134  double Plane[4];
135 
139  int Dual;
140 
145 
150 
155 
160 
165 
170 
171 private:
173  void operator=(const vtkHyperTreeGridPlaneCutter&) = delete;
174 };
175 
176 #endif /* vtkHyperTreeGridPlaneCutter_h */
vtkIdList * Leaves
Storage for dual vertex indices.
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:69
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.
Objects for depth-first traversal HyperTreeGrids.
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:36
int Dual
Decide whether output mesh should be a computed on dual grid.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
object to represent cell connectivity
Definition: vtkCellArray.h:50
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:36
Superclass for algorithms that produce a hyper tree grid as output.
vtkCellArray * Cells
Storage for cells of output unstructured mesh.
static vtkAlgorithm * New()
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64
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...