Back to index

salome-geom  6.5.0
GEOMImpl_IPlane.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 vector creation.
00024 //
00025 #include "GEOM_Function.hxx"
00026 
00027 #define PLN_ARG_SIZE 1
00028 
00029 #define PLN_ARG_PNT1 2
00030 #define PLN_ARG_PNT2 3
00031 #define PLN_ARG_PNT3 4
00032 
00033 #define PLN_ARG_VEC 5
00034 
00035 #define PLN_ARG_REF 6
00036 
00037 #define PLN_ARG_PARAM_U 7
00038 
00039 #define PLN_ARG_PARAM_V 8
00040 
00041 #define PLN_ARG_VEC1    9
00042 #define PLN_ARG_VEC2    10
00043 
00044 #define PLN_ARG_ORIENT  11
00045 
00046 #define PLN_ARG_LCS     12
00047 
00048 class GEOMImpl_IPlane
00049 {
00050  public:
00051 
00052   GEOMImpl_IPlane(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00053 
00054   void SetSize(double theSize) { _func->SetReal(PLN_ARG_SIZE, theSize); }
00055 
00056   double GetSize() { return _func->GetReal(PLN_ARG_SIZE); }
00057   
00058   void SetOrientation(double theOrientation) { _func->SetReal(PLN_ARG_ORIENT, theOrientation); }
00059 
00060   double GetOrientation() { return _func->GetReal(PLN_ARG_ORIENT); }
00061 
00062   void SetPoint (Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT1, theRef); }
00063   void SetVector(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_VEC , theRef); }
00064   void SetVector1(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_VEC1 , theRef); }
00065   void SetVector2(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_VEC2 , theRef); }
00066 
00067   void SetFace  (Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_REF , theRef); }
00068   void SetLCS   (Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_LCS , theRef); }
00069 
00070   void SetPoint1(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT1, theRef); }
00071   void SetPoint2(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT2, theRef); }
00072   void SetPoint3(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT3, theRef); }
00073 
00074   Handle(GEOM_Function) GetPoint () { return _func->GetReference(PLN_ARG_PNT1); }
00075   Handle(GEOM_Function) GetVector() { return _func->GetReference(PLN_ARG_VEC ); }
00076   Handle(GEOM_Function) GetVector1() { return _func->GetReference(PLN_ARG_VEC1 ); }
00077   Handle(GEOM_Function) GetVector2() { return _func->GetReference(PLN_ARG_VEC2 ); }
00078 
00079   Handle(GEOM_Function) GetFace  () { return _func->GetReference(PLN_ARG_REF ); }
00080   Handle(GEOM_Function) GetLCS   () { return _func->GetReference(PLN_ARG_LCS ); }
00081 
00082   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(PLN_ARG_PNT1); }
00083   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(PLN_ARG_PNT2); }
00084   Handle(GEOM_Function) GetPoint3() { return _func->GetReference(PLN_ARG_PNT3); }
00085   
00086   void SetParameterU(double theParamU) { _func->SetReal(PLN_ARG_PARAM_U, theParamU); }
00087   double GetParameterU() { return _func->GetReal(PLN_ARG_PARAM_U); }
00088 
00089   void SetParameterV(double theParamV) { _func->SetReal(PLN_ARG_PARAM_V, theParamV); }
00090   double GetParameterV() { return _func->GetReal(PLN_ARG_PARAM_V); }
00091 
00092  private:
00093 
00094   Handle(GEOM_Function) _func;
00095 };