fixed edge display for volume cells
[engrid-github.git] / src / libengrid / vtkEgNormalExtrusion.h
blobb4c6d5ca7b9b8b5a5dc9c8dfc50ca1bf82b8c753
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 __vtkEgNormalExtrusion_h
22 #define __vtkEgNormalExtrusion_h
24 class vtkEgNormalExtrusion;
26 #include "vtkEgGridFilter.h"
27 #include <QVector>
29 class vtkEgNormalExtrusion : public vtkEgGridFilter
32 protected: // attributes
34 enum mode_t { normal, fixed, planar, cylinder, rotation };
35 mode_t mode;
36 QVector<double> layer_y;
37 vec3_t origin, axis, fixed_normal;
38 double min_dist;
39 double m_ScaleX;
40 double m_ScaleY;
41 double m_ScaleZ;
42 bool m_RemoveInternalFaces;
44 public: // methods
46 static vtkEgNormalExtrusion* New();
47 void SetLayers(const QVector<double> &y);
48 void SetOrigin(vec3_t x) { origin = x; }
49 void SetAxis(vec3_t x) { axis = x; }
50 void SetNormal(vec3_t x) { fixed_normal = x; }
51 void SetMinDist(double d) { min_dist = d; }
52 void SetCylindrical() { mode = cylinder; }
53 void SetFixed() { mode = fixed; }
54 void SetPlanar() { mode = planar; }
55 void SetRotation() { mode = rotation; }
56 void SetRestrictNone() { m_ScaleX = 1; m_ScaleY = 1; m_ScaleZ = 1; }
57 void SetRestrictXY() { m_ScaleX = 1; m_ScaleY = 1; m_ScaleZ = 0; }
58 void SetRestrictXZ() { m_ScaleX = 1; m_ScaleY = 0; m_ScaleZ = 1; }
59 void SetRestrictYZ() { m_ScaleX = 0; m_ScaleY = 1; m_ScaleZ = 1; }
60 void SetRemoveInternalFacesOn() { m_RemoveInternalFaces = true; }
61 void SetRemoveInternalFacesOff() { m_RemoveInternalFaces = false; }
63 protected: // methods
65 vtkEgNormalExtrusion();
66 ~vtkEgNormalExtrusion() {}
67 virtual void ExecuteEg();
69 private: // methods
71 vtkEgNormalExtrusion (const vtkEgNormalExtrusion&);
72 void operator= (const vtkEgNormalExtrusion&);
76 #endif