updated to modern VTK
[engrid-github.git] / src / libengrid / vertexmeshdensity.h
blob5f5739f8655beff58812544c9ed60a2bf6b4ec60
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 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef VERTEXMESHDENSITY_H
22 #define VERTEXMESHDENSITY_H
24 #include <vtkIdList.h>
25 #include <QSet>
26 #include <QVector>
27 #include <QString>
28 #include "egvtkobject.h"
30 ///\todo Rename density to edge length
31 class VertexMeshDensity
34 public: // methods
36 VertexMeshDensity();/// Default constructor
38 // node requirements
39 /** Acceptable boundary codes for neighbour nodes. Unchecked=not allowed, checked=required
40 * the first element is the boundary code
41 * the second element is the acceptance value: 0=unchecked=not allowed, 1=partially checked=does not matter, 2=checked=required
43 QMap <int,int> BCmap;
45 char type;/// Type of the node
46 QSet <vtkIdType> nodeset;/// Set of acceptable node IDs
47 // QVector<Qt::CheckState> BClist_value;// deprecated, replaced by BCmap
49 // density
50 double density;/// desired density for nodes matching all requirements
52 // properties
53 vtkIdType CurrentNode;/// ID of the current node
55 /** operator to compare two VertexMeshDensity objects
56 * this=user defined
57 * VMD=VMD of current node
58 * This operator is NOT SYMMETRICAL. But it can be used with indexOf.
60 bool operator==(const VertexMeshDensity & VMD) const;
62 void setNodes(QString str);/// set nodeset by passing a string of the form "id1,id2,..."
64 int findSmallestVMD( QVector <VertexMeshDensity> vector);
67 /// ostream operator to print out a VertexMeshDensity object
68 ostream& operator<<(ostream &out, VertexMeshDensity A);
70 /// ostream operator to print out a vector of VertexMeshDensity objects
71 ostream& operator<<(ostream &out, QVector<VertexMeshDensity> VMDvector);
73 #endif