updated to modern VTK
[engrid-github.git] / src / libengrid / createhexcore.h
blob20a38691afb5643b6058946cf33eef21bbb102a3
1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // + +
3 // + This file is part of enGrid. +
4 // + +
5 // + Copyright 2008-2014 enGits GmbH +
6 // + +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
11 // + +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
16 // + +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
19 // + +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 #ifndef CREATEHEXCORE_H
23 #define CREATEHEXCORE_H
25 class CreateHexCore;
27 #include "operation.h"
28 #include "octree.h"
30 class CreateHexCore : public Operation
33 private: // data types
35 struct face_replacement_t
37 vtkIdType id_cell;
38 QList<int> faces_to_keep;
39 QList<QVector<vtkIdType> > new_faces;
42 protected: // attributes
44 vec3_t m_X1;
45 vec3_t m_X2;
46 vec3_t m_Xi;
47 Octree m_Octree;
48 int m_NumInitialRefinementLevels;
49 int m_NumBreakOutLayers;
51 protected: // methods
53 virtual void operate();
55 void refineOctree();
56 void transferOctreeGrid();
57 void deleteOutside(vtkUnstructuredGrid *grid);
58 void createBoundaryFaces();
60 public:
62 CreateHexCore(vec3_t x1, vec3_t x2, vec3_t xi, int num_inital_refinement_levels);
63 void setNumBreakOutLayers(int n) { m_NumBreakOutLayers = n; }
67 #endif // CREATEHEXCORE_H