1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + This file is part of enGrid. +
5 // + Copyright 2008-2014 enGits GmbH +
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. +
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. +
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/>. +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef __vtkEgNormalExtrusion_h
22 #define __vtkEgNormalExtrusion_h
24 class vtkEgNormalExtrusion
;
26 #include "vtkEgGridFilter.h"
29 class vtkEgNormalExtrusion
: public vtkEgGridFilter
32 protected: // attributes
34 enum mode_t
{ normal
, fixed
, planar
, cylinder
, rotation
};
36 QVector
<double> layer_y
;
37 vec3_t origin
, axis
, fixed_normal
;
42 bool m_RemoveInternalFaces
;
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; }
65 vtkEgNormalExtrusion();
66 ~vtkEgNormalExtrusion() {}
67 virtual void ExecuteEg();
71 vtkEgNormalExtrusion (const vtkEgNormalExtrusion
&);
72 void operator= (const vtkEgNormalExtrusion
&);