forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkHyperTreeGridGeometry.h
157 lines (130 loc) · 3.78 KB
/
vtkHyperTreeGridGeometry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*=========================================================================
Program: Visualization Toolkit
Module: vtkHyperTreeGridGeometry.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkHyperTreeGridGeometry
* @brief Hyper tree grid outer surface
*
* @sa
* vtkHyperTreeGrid vtkHyperTreeGridAlgorithm
*
* @par Thanks:
* This class was written by Philippe Pebay, Joachim Pouderoux,
* and Charles Law, Kitware 2013
* This class was modified by Guenole Harel and Jacques-Bernard Lekien, 2014
* This class was rewritten by Philippe Pebay, NexGen Analytics 2017
* This work was supported by Commissariat a l'Energie Atomique (CEA/DIF)
*/
#ifndef vtkHyperTreeGridGeometry_h
#define vtkHyperTreeGridGeometry_h
#include "vtkFiltersHyperTreeModule.h" // For export macro
#include "vtkHyperTreeGridAlgorithm.h"
class vtkBitArray;
class vtkCellArray;
class vtkDoubleArray;
class vtkHyperTreeGrid;
class vtkHyperTreeGridCursor;
class vtkIdList;
class vtkIdTypeArray;
class vtkPoints;
class VTKFILTERSHYPERTREE_EXPORT vtkHyperTreeGridGeometry : public vtkHyperTreeGridAlgorithm
{
public:
static vtkHyperTreeGridGeometry* New();
vtkTypeMacro( vtkHyperTreeGridGeometry, vtkHyperTreeGridAlgorithm );
void PrintSelf( ostream&, vtkIndent ) override;
protected:
vtkHyperTreeGridGeometry();
~vtkHyperTreeGridGeometry() override;
/**
* For this algorithm the output is a vtkPolyData instance
*/
int FillOutputPortInformation( int, vtkInformation* ) override;
/**
* Main routine to generate external boundary
*/
int ProcessTrees( vtkHyperTreeGrid*, vtkDataObject* ) override;
/**
* Recursively descend into tree down to leaves
*/
void RecursivelyProcessTree( vtkHyperTreeGridCursor*, vtkBitArray* );
/**
* Process 1D leaves and issue corresponding edges (lines)
*/
void ProcessLeaf1D( vtkHyperTreeGridCursor* );
/**
* Process 2D leaves and issue corresponding faces (quads)
*/
void ProcessLeaf2D( vtkHyperTreeGridCursor*, vtkBitArray* );
/**
* Process 3D leaves and issue corresponding cells (voxels)
*/
void ProcessLeaf3D( vtkHyperTreeGridCursor*, vtkBitArray* );
/**
* Helper method to generate a face based on its normal and offset from cursor origin
*/
void AddFace( vtkIdType, double*, double*, int, unsigned int, bool create = true );
/**
* Dimension of input grid
*/
unsigned int Dimension;
/**
* Orientation of input grid when dimension < 3
*/
unsigned int Orientation;
/**
* Storage for points of output unstructured mesh
*/
vtkPoints* Points;
/**
* Storage for cells of output unstructured mesh
*/
vtkCellArray* Cells;
//@{
/**
* Keep track of input interface parameters
*/
bool HasInterface;
vtkDoubleArray* Normals;
vtkDoubleArray* Intercepts;
//@}
//@{
/**
* Storage for interface points
*/
vtkPoints* FacePoints;
vtkIdList* FaceIDs;
//@}
//@{
/**
* Storage for interface edges
*/
vtkIdType EdgesA[12];
vtkIdType EdgesB[12];
//@}
//@{
/**
* Storage for interface faces
*/
vtkIdTypeArray* FacesA;
vtkIdTypeArray* FacesB;
//@}
//@{
/**
* Storage for interface scalars
*/
vtkDoubleArray* FaceScalarsA;
vtkDoubleArray* FaceScalarsB;
//@}
private:
vtkHyperTreeGridGeometry(const vtkHyperTreeGridGeometry&) = delete;
void operator=(const vtkHyperTreeGridGeometry&) = delete;
};
#endif /* vtkHyperTreeGridGeometry_h */