Back to index

salome-geom  6.5.0
GEOMImpl_IDisk.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //NOTE: This is an intreface to a function for the Disk creation.
00021 //
00022 #include "GEOM_Function.hxx"
00023 
00024 #define DISK_ARG_P1      1
00025 #define DISK_ARG_P2      2
00026 #define DISK_ARG_P3      3
00027 
00028 #define DISK_ARG_CC      4
00029 #define DISK_ARG_VV      5
00030 #define DISK_ARG_RR      6
00031 
00032 #define DISK_ARG_ORIENT  7
00033 
00034 class GEOMImpl_IDisk
00035 {
00036  public:
00037 
00038   GEOMImpl_IDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00039 
00040   void SetPoint1(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_P1, theP); }
00041   void SetPoint2(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_P2, theP); }
00042   void SetPoint3(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_P3, theP); }
00043 
00044   void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_CC, theP); }
00045   void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(DISK_ARG_VV, theV); }
00046 
00047   void SetRadius(double theR) { _func->SetReal(DISK_ARG_RR, theR); }
00048   void SetOrientation(double theO) { _func->SetReal(DISK_ARG_ORIENT, theO); }
00049 
00050   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(DISK_ARG_P1); }
00051   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(DISK_ARG_P2); }
00052   Handle(GEOM_Function) GetPoint3() { return _func->GetReference(DISK_ARG_P3); }
00053 
00054   Handle(GEOM_Function) GetCenter() { return _func->GetReference(DISK_ARG_CC); }
00055   Handle(GEOM_Function) GetVector() { return _func->GetReference(DISK_ARG_VV); }
00056 
00057   double GetRadius() { return _func->GetReal(DISK_ARG_RR); }
00058   double GetOrientation() { return _func->GetReal(DISK_ARG_ORIENT); }
00059 
00060  private:
00061 
00062   Handle(GEOM_Function) _func;
00063 };