2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 // + This file is part of enGrid. +
6 // + Copyright 2008-2013 enGits GmbH +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 #ifndef INSERTPOINTS_H
24 #define INSERTPOINTS_H
26 #include "surfaceoperation.h"
28 #include <vtkUnstructuredGrid.h>
29 #include <vtkPolyData.h>
32 #include "egvtkobject.h"
33 #include "vertexmeshdensity.h"
35 #include "geometrytools.h"
36 using namespace GeometryTools
;
41 class InsertPoints
: public SurfaceOperation
44 private: // data-types
51 double quality() const { return 0.5*min(L1
,L2
)/L12
; }
52 bool operator< (const edge_t
& E
) const { return quality() < E
.quality(); }
55 private: // attributes
62 char getNewNodeType(stencil_t S
); ///< Returns the type of the node inserted on the edge S.p[1],S.p[3] from stencil_t S
67 virtual void operate();
69 int getNumInserted() { return m_NumInserted
; }