]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMImpl/GEOMImpl_ICircle.hxx
Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ICircle.hxx
1 //NOTE: This is an intreface to a function for the Circle creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define CIRC_ARG_P1  1
7 #define CIRC_ARG_P2  2
8 #define CIRC_ARG_P3  3
9
10 #define CIRC_ARG_CC  4
11 #define CIRC_ARG_VV  5
12 #define CIRC_ARG_RR  6
13
14 class GEOMImpl_ICircle
15 {
16  public:
17
18   GEOMImpl_ICircle(Handle(GEOM_Function) theFunction): _func(theFunction) {}
19
20   void SetPoint1(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_P1, theP); }
21   void SetPoint2(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_P2, theP); }
22   void SetPoint3(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_P3, theP); }
23
24   void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_CC, theP); }
25   void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(CIRC_ARG_VV, theV); }
26
27   void SetRadius(double theR) { _func->SetReal(CIRC_ARG_RR, theR); }
28
29   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(CIRC_ARG_P1); }
30   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(CIRC_ARG_P2); }
31   Handle(GEOM_Function) GetPoint3() { return _func->GetReference(CIRC_ARG_P3); }
32
33   Handle(GEOM_Function) GetCenter() { return _func->GetReference(CIRC_ARG_CC); }
34   Handle(GEOM_Function) GetVector() { return _func->GetReference(CIRC_ARG_VV); }
35
36   double GetRadius() { return _func->GetReal(CIRC_ARG_RR); }
37
38  private:
39
40   Handle(GEOM_Function) _func;
41 };