Salome HOME
Merge from V4_1_0_maintainance branch (from tag mergeto_BR_QT4_Dev_08Jul08)
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ITranslate.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //NOTE: This is an intreface to a function for the Translate creation.
21
22
23 #include "GEOM_Function.hxx"
24
25 #define TRANSLATE_ARG_POINT1   1  
26 #define TRANSLATE_ARG_POINT2   2
27 #define TRANSLATE_ARG_VECTOR   3
28 #define TRANSLATE_ARG_ORIGINAL 6
29 #define TRANSLATE_ARG_STEP1    7
30 #define TRANSLATE_ARG_NBITER1  8
31 #define TRANSLATE_ARG_STEP2    9
32 #define TRANSLATE_ARG_NBITER2  10
33 #define TRANSLATE_ARG_VECTOR2  11
34 #define TRANSLATE_ARG_DX  12
35 #define TRANSLATE_ARG_DY  13  
36 #define TRANSLATE_ARG_DZ  14
37 #define TRANSLATE_ARG_DISTANCE 15    
38
39 class GEOMImpl_ITranslate
40 {
41  public:
42   
43   GEOMImpl_ITranslate(Handle(GEOM_Function) theFunction): _func(theFunction) {}
44   
45   void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(TRANSLATE_ARG_POINT1, thePoint1); }
46   
47   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(TRANSLATE_ARG_POINT1); }
48   
49   void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(TRANSLATE_ARG_POINT2, thePoint2); }
50   
51   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(TRANSLATE_ARG_POINT2); }
52   
53   void SetVector(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR, theVector); }
54   
55   Handle(GEOM_Function) GetVector() { return _func->GetReference(TRANSLATE_ARG_VECTOR); } 
56   
57   void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(TRANSLATE_ARG_ORIGINAL, theOriginal); }
58
59   Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRANSLATE_ARG_ORIGINAL); }
60   
61   void SetStep1(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP1, theStep); }
62
63   double GetStep1() { return _func->GetReal(TRANSLATE_ARG_STEP1); }
64
65   void SetNbIter1(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER1, theNbIter); }
66
67   int GetNbIter1() { return _func->GetInteger(TRANSLATE_ARG_NBITER1); } 
68
69   void SetStep2(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP2, theStep); }
70
71   double GetStep2() { return _func->GetReal(TRANSLATE_ARG_STEP2); }
72
73   void SetNbIter2(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER2, theNbIter); }
74
75   int GetNbIter2() { return _func->GetInteger(TRANSLATE_ARG_NBITER2); } 
76
77   void SetVector2(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR2, theVector); }
78   
79   Handle(GEOM_Function) GetVector2() { return _func->GetReference(TRANSLATE_ARG_VECTOR2); } 
80
81   void SetDX(double theDX) { return _func->SetReal(TRANSLATE_ARG_DX, theDX); }
82
83   double GetDX() { return _func->GetReal(TRANSLATE_ARG_DX); }
84
85   void SetDistance(double theDistance) { return _func->SetReal(TRANSLATE_ARG_DISTANCE, theDistance); }
86
87   double GetDistance() { return _func->GetReal(TRANSLATE_ARG_DISTANCE); }
88
89   void SetDY(double theDY) { return _func->SetReal(TRANSLATE_ARG_DY, theDY); }
90
91   double GetDY() { return _func->GetReal(TRANSLATE_ARG_DY); }
92
93   void SetDZ(double theDZ) { return _func->SetReal(TRANSLATE_ARG_DZ, theDZ); }
94
95   double GetDZ() { return _func->GetReal(TRANSLATE_ARG_DZ); }
96
97  private:
98   
99   Handle(GEOM_Function) _func;  
100 };