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