Salome HOME
3102ea484472bc7df6ece0f023e951e1f52bd9d1
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IDisk.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 Disk creation.
23 //
24 #include "GEOM_Function.hxx"
25
26 #define DISK_ARG_P1      1
27 #define DISK_ARG_P2      2
28 #define DISK_ARG_P3      3
29
30 #define DISK_ARG_CC      4
31 #define DISK_ARG_VV      5
32 #define DISK_ARG_RR      6
33
34 #define DISK_ARG_ORIENT  7
35
36 class GEOMImpl_IDisk
37 {
38  public:
39
40   GEOMImpl_IDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {}
41
42   void SetPoint1(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_P1, theP); }
43   void SetPoint2(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_P2, theP); }
44   void SetPoint3(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_P3, theP); }
45
46   void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(DISK_ARG_CC, theP); }
47   void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(DISK_ARG_VV, theV); }
48
49   void SetRadius(double theR) { _func->SetReal(DISK_ARG_RR, theR); }
50   void SetOrientation(double theO) { _func->SetReal(DISK_ARG_ORIENT, theO); }
51
52   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(DISK_ARG_P1); }
53   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(DISK_ARG_P2); }
54   Handle(GEOM_Function) GetPoint3() { return _func->GetReference(DISK_ARG_P3); }
55
56   Handle(GEOM_Function) GetCenter() { return _func->GetReference(DISK_ARG_CC); }
57   Handle(GEOM_Function) GetVector() { return _func->GetReference(DISK_ARG_VV); }
58
59   double GetRadius() { return _func->GetReal(DISK_ARG_RR); }
60   double GetOrientation() { return _func->GetReal(DISK_ARG_ORIENT); }
61
62  private:
63
64   Handle(GEOM_Function) _func;
65 };