1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (EDF R&D)
21 #ifndef __ORIENTATIONINVERTER_HXX__
22 #define __ORIENTATIONINVERTER_HXX__
24 #include "INTERPKERNELDefines.hxx"
26 namespace INTERP_KERNEL
28 class OrientationInverter
31 INTERPKERNEL_EXPORT virtual ~OrientationInverter() { }
32 INTERPKERNEL_EXPORT virtual void operate(int *beginPt, int *endPt) const = 0;
35 class OrientationInverterChecker : public OrientationInverter
38 OrientationInverterChecker(unsigned nbNodes):_nb_nodes(nbNodes) { }
39 void operate(int *beginPt, int *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); }
40 virtual void operateAndShutUp(int *beginPt) const = 0;
42 unsigned getNbNodes() const { return _nb_nodes; }
44 void check(int *beginPt, int *endPt) const;
49 class OrientationInverterSEG2 : public OrientationInverterChecker
52 OrientationInverterSEG2():OrientationInverterChecker(2u) { }
53 void operateAndShutUp(int *beginPt) const;
56 class OrientationInverterSEG3 : public OrientationInverterChecker
59 OrientationInverterSEG3():OrientationInverterChecker(3u) { }
60 void operateAndShutUp(int *beginPt) const;
63 class OrientationInverter2DLinear : public OrientationInverterChecker
66 OrientationInverter2DLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
67 void operateAndShutUp(int *beginPt) const;
70 class OrientationInverter2DQuadratic : public OrientationInverterChecker
73 OrientationInverter2DQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
74 void operateAndShutUp(int *beginPt) const;
77 class OrientationInverterPolygon : public OrientationInverter
80 void operate(int *beginPt, int *endPt) const;
83 class OrientationInverterQPolygon : public OrientationInverter
86 void operate(int *beginPt, int *endPt) const;
89 class OrientationInverterTetra4 : public OrientationInverterChecker
92 OrientationInverterTetra4():OrientationInverterChecker(4u) { }
93 void operateAndShutUp(int *beginPt) const;
96 class OrientationInverterTetra10 : public OrientationInverterChecker
99 OrientationInverterTetra10():OrientationInverterChecker(4u) { }
100 void operateAndShutUp(int *beginPt) const;
103 class OrientationInverterPyra5 : public OrientationInverterChecker
106 OrientationInverterPyra5():OrientationInverterChecker(5u) { }
107 void operateAndShutUp(int *beginPt) const;
110 class OrientationInverterPyra13 : public OrientationInverterChecker
113 OrientationInverterPyra13():OrientationInverterChecker(13u) { }
114 void operateAndShutUp(int *beginPt) const;
117 class OrientationInverter3DExtrusionLinear : public OrientationInverterChecker
120 OrientationInverter3DExtrusionLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
121 void operateAndShutUp(int *beginPt) const;
124 class OrientationInverter3DExtrusionQuadratic : public OrientationInverterChecker
127 OrientationInverter3DExtrusionQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
128 void operateAndShutUp(int *beginPt) const;