Salome HOME
Update copyright information
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IBlockTrsf.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //NOTE: This is an interface to a function for the Blocks Multi-Transformations.
23 //
24 #include "GEOM_Function.hxx"
25
26 #define TRSF_ORIGIN  1
27
28 #define TRSF_FACE_1_U  2
29 #define TRSF_FACE_2_U  3
30 #define TRSF_NBITER_U  4
31 #define TRSF_FACE_1_V  5
32 #define TRSF_FACE_2_V  6
33 #define TRSF_NBITER_V  7
34
35 class GEOMImpl_IBlockTrsf
36 {
37  public:
38
39   GEOMImpl_IBlockTrsf (Handle(GEOM_Function) theFunction): _func(theFunction) {}
40
41   void SetOriginal (Handle(GEOM_Function) theOriginal) { _func->SetReference(TRSF_ORIGIN, theOriginal); }
42
43   Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRSF_ORIGIN); }
44
45   void SetFace1U  (int theFaceId) { _func->SetInteger(TRSF_FACE_1_U, theFaceId); }
46   void SetFace2U  (int theFaceId) { _func->SetInteger(TRSF_FACE_2_U, theFaceId); }
47   void SetFace1V  (int theFaceId) { _func->SetInteger(TRSF_FACE_1_V, theFaceId); }
48   void SetFace2V  (int theFaceId) { _func->SetInteger(TRSF_FACE_2_V, theFaceId); }
49   void SetNbIterU (int theNbIter) { _func->SetInteger(TRSF_NBITER_U, theNbIter); }
50   void SetNbIterV (int theNbIter) { _func->SetInteger(TRSF_NBITER_V, theNbIter); }
51
52   int GetFace1U () { return _func->GetInteger(TRSF_FACE_1_U); }
53   int GetFace2U () { return _func->GetInteger(TRSF_FACE_2_U); }
54   int GetFace1V () { return _func->GetInteger(TRSF_FACE_1_V); }
55   int GetFace2V () { return _func->GetInteger(TRSF_FACE_2_V); }
56   int GetNbIterU() { return _func->GetInteger(TRSF_NBITER_U); }
57   int GetNbIterV() { return _func->GetInteger(TRSF_NBITER_V); }
58
59  private:
60
61   Handle(GEOM_Function) _func;
62 };