Salome HOME
4c66924409d6e712f12b989c968a6c32dccf3e17
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ITranslate.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 intreface to a function for the Translate creation.
23 //
24 #include "GEOM_Function.hxx"
25
26 #define TRANSLATE_ARG_POINT1   1  
27 #define TRANSLATE_ARG_POINT2   2
28 #define TRANSLATE_ARG_VECTOR   3
29 #define TRANSLATE_ARG_ORIGINAL 6
30 #define TRANSLATE_ARG_STEP1    7
31 #define TRANSLATE_ARG_NBITER1  8
32 #define TRANSLATE_ARG_STEP2    9
33 #define TRANSLATE_ARG_NBITER2  10
34 #define TRANSLATE_ARG_VECTOR2  11
35 #define TRANSLATE_ARG_DX  12
36 #define TRANSLATE_ARG_DY  13  
37 #define TRANSLATE_ARG_DZ  14
38 #define TRANSLATE_ARG_DISTANCE 15    
39
40 class GEOMImpl_ITranslate
41 {
42  public:
43   
44   GEOMImpl_ITranslate(Handle(GEOM_Function) theFunction): _func(theFunction) {}
45   
46   void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(TRANSLATE_ARG_POINT1, thePoint1); }
47   
48   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(TRANSLATE_ARG_POINT1); }
49   
50   void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(TRANSLATE_ARG_POINT2, thePoint2); }
51   
52   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(TRANSLATE_ARG_POINT2); }
53   
54   void SetVector(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR, theVector); }
55   
56   Handle(GEOM_Function) GetVector() { return _func->GetReference(TRANSLATE_ARG_VECTOR); } 
57   
58   void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(TRANSLATE_ARG_ORIGINAL, theOriginal); }
59
60   Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRANSLATE_ARG_ORIGINAL); }
61   
62   void SetStep1(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP1, theStep); }
63
64   double GetStep1() { return _func->GetReal(TRANSLATE_ARG_STEP1); }
65
66   void SetNbIter1(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER1, theNbIter); }
67
68   int GetNbIter1() { return _func->GetInteger(TRANSLATE_ARG_NBITER1); } 
69
70   void SetStep2(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP2, theStep); }
71
72   double GetStep2() { return _func->GetReal(TRANSLATE_ARG_STEP2); }
73
74   void SetNbIter2(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER2, theNbIter); }
75
76   int GetNbIter2() { return _func->GetInteger(TRANSLATE_ARG_NBITER2); } 
77
78   void SetVector2(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR2, theVector); }
79   
80   Handle(GEOM_Function) GetVector2() { return _func->GetReference(TRANSLATE_ARG_VECTOR2); } 
81
82   void SetDX(double theDX) { return _func->SetReal(TRANSLATE_ARG_DX, theDX); }
83
84   double GetDX() { return _func->GetReal(TRANSLATE_ARG_DX); }
85
86   void SetDistance(double theDistance) { return _func->SetReal(TRANSLATE_ARG_DISTANCE, theDistance); }
87
88   double GetDistance() { return _func->GetReal(TRANSLATE_ARG_DISTANCE); }
89
90   void SetDY(double theDY) { return _func->SetReal(TRANSLATE_ARG_DY, theDY); }
91
92   double GetDY() { return _func->GetReal(TRANSLATE_ARG_DY); }
93
94   void SetDZ(double theDZ) { return _func->SetReal(TRANSLATE_ARG_DZ, theDZ); }
95
96   double GetDZ() { return _func->GetReal(TRANSLATE_ARG_DZ); }
97
98  private:
99   
100   Handle(GEOM_Function) _func;  
101 };