Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IPoint.hxx
1 //NOTE: This is an intreface to a function for the point creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define ARG_X     1
7 #define ARG_Y     2
8 #define ARG_Z     3
9
10 #define ARG_REF   4
11
12 #define ARG_PARAM 5
13 #define ARG_CURVE 6
14
15 class GEOMImpl_IPoint
16 {
17  public:
18
19   GEOMImpl_IPoint(Handle(GEOM_Function) theFunction): _func(theFunction) {}
20
21   void SetX(double theX) { _func->SetReal(ARG_X, theX); }
22   void SetY(double theY) { _func->SetReal(ARG_Y, theY); }
23   void SetZ(double theZ) { _func->SetReal(ARG_Z, theZ); }
24
25   double GetX() { return _func->GetReal(ARG_X); }
26   double GetY() { return _func->GetReal(ARG_Y); }
27   double GetZ() { return _func->GetReal(ARG_Z); }
28
29   void SetRef(Handle(GEOM_Function) theRefPoint) { _func->SetReference(ARG_REF, theRefPoint); }
30
31   Handle(GEOM_Function) GetRef() { return _func->GetReference(ARG_REF); }
32
33   void SetCurve(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_CURVE, theRef); }
34
35   Handle(GEOM_Function) GetCurve() { return _func->GetReference(ARG_CURVE); }
36
37   void SetParameter(double theParam) { _func->SetReal(ARG_PARAM, theParam); }
38
39   double GetParameter() { return _func->GetReal(ARG_PARAM); }
40
41  private:
42
43   Handle(GEOM_Function) _func;
44 };