Salome HOME
b3f06595a1e99502bd29da0e91934689337c4cd2
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IEllipse.hxx
1 //NOTE: This is an intreface to a function for the Ellipse creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define ELLIPS_ARG_CC   1
7 #define ELLIPS_ARG_VV   2
8 #define ELLIPS_ARG_RMAJ 3
9 #define ELLIPS_ARG_RMIN 4
10
11 class GEOMImpl_IEllipse
12 {
13  public:
14
15   GEOMImpl_IEllipse(Handle(GEOM_Function) theFunction): _func(theFunction) {}
16
17   void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(ELLIPS_ARG_CC, theP); }
18   void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(ELLIPS_ARG_VV, theV); }
19
20   void SetRMajor(double theR) { _func->SetReal(ELLIPS_ARG_RMAJ, theR); }
21   void SetRMinor(double theR) { _func->SetReal(ELLIPS_ARG_RMIN, theR); }
22
23   Handle(GEOM_Function) GetCenter() { return _func->GetReference(ELLIPS_ARG_CC); }
24   Handle(GEOM_Function) GetVector() { return _func->GetReference(ELLIPS_ARG_VV); }
25
26   double GetRMajor() { return _func->GetReal(ELLIPS_ARG_RMAJ); }
27   double GetRMinor() { return _func->GetReal(ELLIPS_ARG_RMIN); }
28
29  private:
30
31   Handle(GEOM_Function) _func;
32 };