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 
47 class vtkCellArray;
48 class vtkCutter;
49 class vtkIdList;
50 class vtkPoints;
51 class vtkPlane;
52 
53 class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridPlaneCutter : public vtkHyperTreeGridAlgorithm
54 {
55 public:
58  void PrintSelf( ostream&, vtkIndent ) override;
59 
61 
67  vtkSetVector4Macro(Plane,double);
68  vtkGetVector4Macro(Plane,double);
70 
78  void SetPlane(vtkPlane *plane) { this->SetPlaneObj(plane); }
79  void SetPlaneObj(vtkPlane*);
80  vtkGetObjectMacro(PlaneObj, vtkPlane)
81 
82  //@{
86  vtkSetMacro(Dual,int);
87  vtkGetMacro(Dual,int);
88  vtkBooleanMacro(Dual,int);
90 
91  vtkMTimeType GetMTime() override;
92 
93 protected:
95  ~vtkHyperTreeGridPlaneCutter() override;
96 
100  int FillOutputPortInformation( int, vtkInformation* ) override;
101 
105  int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
106 
110  void RecursivelyProcessTreePrimal( vtkHyperTreeGridCursor*, vtkBitArray* );
111 
115  bool RecursivelyPreProcessTree( vtkHyperTreeGridCursor*, vtkBitArray* );
116 
120  void RecursivelyProcessTreeDual( vtkHyperTreeGridCursor*, vtkBitArray* );
121 
125  bool CheckIntersection( double[8][3], double[8] );
126 
127  // Check if a cursor is intersected by a plane.
128  // Don't return function evaluations
129  bool CheckIntersection( double[8][3] );
130 
134  void PlaneCut( int, int, double[8][3], int&, double[][3] );
135 
139  void ReorderCutPoints( int, double[][3] );
140 
144  double Plane[4];
145 
149  int Dual;
150 
155 
160 
165 
170 
175 
180 
185 
186 private:
188  void operator=(const vtkHyperTreeGridPlaneCutter&) = delete;
189 };
190 
191 #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:149
vtkHyperTreeGridCursor
Objects for depth-first traversal HyperTreeGrids.
Definition: vtkHyperTreeGridCursor.h:45
vtkHyperTreeGridPlaneCutter
cut a hyper tree grid volume with a plane and generate a polygonal cut surface.
Definition: vtkHyperTreeGridPlaneCutter.h:53
vtkPlane
perform various plane computations
Definition: vtkPlane.h:31
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:164
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
vtkHyperTreeGridPlaneCutter::SetPlane
void SetPlane(vtkPlane *plane)
Set the plane by specifying a vtkPlane object.
Definition: vtkHyperTreeGridPlaneCutter.h:78
vtkHyperTreeGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkHyperTreeGridPlaneCutter::Centers
vtkPoints * Centers
Storage for dual vertices at center of primal cells.
Definition: vtkHyperTreeGridPlaneCutter.h:174
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:159
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:44
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkHyperTreeGridPlaneCutter::Leaves
vtkIdList * Leaves
Storage for dual vertex indices.
Definition: vtkHyperTreeGridPlaneCutter.h:169
vtkHyperTreeGridAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkHyperTreeGridPlaneCutter::Cutter
vtkCutter * Cutter
Cutter to be used on dual cells.
Definition: vtkHyperTreeGridPlaneCutter.h:179
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:33
vtkHyperTreeGridPlaneCutter::SelectedCells
vtkBitArray * SelectedCells
Storage for pre-selected cells to be processed in dual mode.
Definition: vtkHyperTreeGridPlaneCutter.h:154
vtkHyperTreeGridPlaneCutter::PlaneObj
vtkPlane * PlaneObj
Plane object used to hold plane state.
Definition: vtkHyperTreeGridPlaneCutter.h:184
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:46
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:67
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302