Back to index

salome-geom  6.5.0
GEOMImpl_ITranslate.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //NOTE: This is an intreface to a function for the Translate creation.
00024 //
00025 #include "GEOM_Function.hxx"
00026 
00027 #define TRANSLATE_ARG_POINT1   1  
00028 #define TRANSLATE_ARG_POINT2   2
00029 #define TRANSLATE_ARG_VECTOR   3
00030 #define TRANSLATE_ARG_ORIGINAL 6
00031 #define TRANSLATE_ARG_STEP1    7
00032 #define TRANSLATE_ARG_NBITER1  8
00033 #define TRANSLATE_ARG_STEP2    9
00034 #define TRANSLATE_ARG_NBITER2  10
00035 #define TRANSLATE_ARG_VECTOR2  11
00036 #define TRANSLATE_ARG_DX  12
00037 #define TRANSLATE_ARG_DY  13  
00038 #define TRANSLATE_ARG_DZ  14
00039 #define TRANSLATE_ARG_DISTANCE 15    
00040 
00041 class GEOMImpl_ITranslate
00042 {
00043  public:
00044   
00045   GEOMImpl_ITranslate(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00046   
00047   void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(TRANSLATE_ARG_POINT1, thePoint1); }
00048   
00049   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(TRANSLATE_ARG_POINT1); }
00050   
00051   void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(TRANSLATE_ARG_POINT2, thePoint2); }
00052   
00053   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(TRANSLATE_ARG_POINT2); }
00054   
00055   void SetVector(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR, theVector); }
00056   
00057   Handle(GEOM_Function) GetVector() { return _func->GetReference(TRANSLATE_ARG_VECTOR); } 
00058   
00059   void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(TRANSLATE_ARG_ORIGINAL, theOriginal); }
00060 
00061   Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRANSLATE_ARG_ORIGINAL); }
00062   
00063   void SetStep1(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP1, theStep); }
00064 
00065   double GetStep1() { return _func->GetReal(TRANSLATE_ARG_STEP1); }
00066 
00067   void SetNbIter1(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER1, theNbIter); }
00068 
00069   int GetNbIter1() { return _func->GetInteger(TRANSLATE_ARG_NBITER1); } 
00070 
00071   void SetStep2(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP2, theStep); }
00072 
00073   double GetStep2() { return _func->GetReal(TRANSLATE_ARG_STEP2); }
00074 
00075   void SetNbIter2(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER2, theNbIter); }
00076 
00077   int GetNbIter2() { return _func->GetInteger(TRANSLATE_ARG_NBITER2); } 
00078 
00079   void SetVector2(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR2, theVector); }
00080   
00081   Handle(GEOM_Function) GetVector2() { return _func->GetReference(TRANSLATE_ARG_VECTOR2); } 
00082 
00083   void SetDX(double theDX) { return _func->SetReal(TRANSLATE_ARG_DX, theDX); }
00084 
00085   double GetDX() { return _func->GetReal(TRANSLATE_ARG_DX); }
00086 
00087   void SetDistance(double theDistance) { return _func->SetReal(TRANSLATE_ARG_DISTANCE, theDistance); }
00088 
00089   double GetDistance() { return _func->GetReal(TRANSLATE_ARG_DISTANCE); }
00090 
00091   void SetDY(double theDY) { return _func->SetReal(TRANSLATE_ARG_DY, theDY); }
00092 
00093   double GetDY() { return _func->GetReal(TRANSLATE_ARG_DY); }
00094 
00095   void SetDZ(double theDZ) { return _func->SetReal(TRANSLATE_ARG_DZ, theDZ); }
00096 
00097   double GetDZ() { return _func->GetReal(TRANSLATE_ARG_DZ); }
00098 
00099  private:
00100   
00101   Handle(GEOM_Function) _func;  
00102 };