added methods to convert between Cartesian and spherical coordinates
[engrid-github.git] / src / libengrid / reducedpolydatareader.h
blob504226807f3bc19677e06ff1ed90fe5b561420ca
1 //
2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + +
4 // + This file is part of enGrid. +
5 // + +
6 // + Copyright 2008-2012 enGits GmbH +
7 // + +
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. +
12 // + +
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. +
17 // + +
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/>. +
20 // + +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 //
24 #ifndef REDUCEDPOLYDATAREADER_H
25 #define REDUCEDPOLYDATAREADER_H
27 class ReducedPolyDataReader;
29 #include "iooperation.h"
31 /**
32 * Reader for VTK legacy files containing vtkPolyData.
33 * This reader will perform a reduction of the number of nodes and faces.
35 class ReducedPolyDataReader : public IOOperation
38 private: // data-types
40 struct Triangle
42 vtkIdType id_a, id_b, id_c;
43 vec3_t a, b, c;
44 vec3_t g1, g2, g3;
45 mat3_t G, GI;
46 double A;
47 double smallest_length;
51 private: // attributes
53 double m_MaxEdgeLength;
54 double m_MinEdgeLength;
57 protected: // methods
59 void computeLevelSet(vtkUnstructuredGrid *grid, vtkPolyData* poly);
60 virtual void operate();
63 public: // methods
65 ReducedPolyDataReader();
69 #endif // REDUCEDPOLYDATAREADER_H