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 =========================================================================*/
43 #ifndef vtkHyperTreeGridPlaneCutter_h
44 #define vtkHyperTreeGridPlaneCutter_h
45 
46 #include "vtkFiltersHyperTreeModule.h" // For export macro
48 
50 class vtkCellArray;
51 class vtkCutter;
52 class vtkIdList;
53 class vtkPoints;
54 class vtkPlane;
55 
56 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridPlaneCutter : public vtkHyperTreeGridAlgorithm
57 {
58 public:
61  void PrintSelf( ostream&, vtkIndent ) override;
62 
64 
70  vtkSetVector4Macro(Plane,double);
71  vtkGetVector4Macro(Plane,double);
73 
81  void SetPlane(vtkPlane *plane) { this->SetPlaneObj(plane); }
83  vtkGetObjectMacro(PlaneObj, vtkPlane)
84 
85  //@{
89  vtkSetMacro(Dual,int);
90  vtkGetMacro(Dual,int);
91  vtkBooleanMacro(Dual,int);
93 
94  vtkMTimeType GetMTime() override;
95 
96 protected:
99 
103  int FillOutputPortInformation( int, vtkInformation* ) override;
104 
108  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
109 
113  void RecursivelyProcessTreePrimal( vtkHyperTreeGridCursor*, vtkBitArray* );
114 
118  bool RecursivelyPreProcessTree( vtkHyperTreeGridCursor*, vtkBitArray* );
119 
123  void RecursivelyProcessTreeDual( vtkHyperTreeGridCursor*, vtkBitArray* );
124 
128  bool CheckIntersection( double[8][3], double[8] );
129 
130  // Check if a cursor is intersected by a plane.
131  // Don't return function evaluations
132  bool CheckIntersection( double[8][3] );
133 
137  void PlaneCut( int, int, double[8][3], int&, double[][3] );
138 
142  void ReorderCutPoints( int, double[][3] );
143 
147  double Plane[4];
148 
152  int Dual;
153 
157  vtkBitArray* SelectedCells;
158 
162  vtkPoints* Points;
163 
167  vtkCellArray* Cells;
168 
172  vtkIdList* Leaves;
173 
177  vtkPoints* Centers;
178 
182  vtkCutter* Cutter;
183 
187  vtkPlane *PlaneObj;
188 
189 private:
191  void operator=(const vtkHyperTreeGridPlaneCutter&) = delete;
192 };
193 
194 #endif /* vtkHyperTreeGridPlaneCutter_h */
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkHyperTreeGridCursor
Objects for depth-first traversal HyperTreeGrids.
Definition: vtkHyperTreeGridCursor.h:46
vtkHyperTreeGridPlaneCutter
cut a hyper tree grid volume with a plane and generate a polygonal cut surface.
Definition: vtkHyperTreeGridPlaneCutter.h:57
vtkPlane
perform various plane computations
Definition: vtkPlane.h:38
vtkCutter
Cut vtkDataSet with user-specified implicit function.
Definition: vtkCutter.h:70
vtkHyperTreeGridPlaneCutter::New
static vtkHyperTreeGridPlaneCutter * New()
vtkHyperTreeGridPlaneCutter::PrintSelf
void PrintSelf(ostream &, vtkIndent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperTreeGridAlgorithm.h
vtkHyperTreeGridPlaneCutter::SetPlane
void SetPlane(vtkPlane *plane)
Set the plane by specifying a vtkPlane object.
Definition: vtkHyperTreeGridPlaneCutter.h:81
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkHyperTreeGridPlaneCutter::SetPlaneObj
void SetPlaneObj(vtkPlane *)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:37
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
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:71
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302