Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IVector.hxx
1 //NOTE: This is an intreface to a function for the vector creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define VEC_ARG_DX   1
7 #define VEC_ARG_DY   2
8 #define VEC_ARG_DZ   3
9
10 #define VEC_ARG_PNT1 4
11 #define VEC_ARG_PNT2 5
12
13 class GEOMImpl_IVector
14 {
15  public:
16
17   GEOMImpl_IVector(Handle(GEOM_Function) theFunction): _func(theFunction) {}
18
19   void SetDX(double theDX) { _func->SetReal(VEC_ARG_DX, theDX); }
20   void SetDY(double theDY) { _func->SetReal(VEC_ARG_DY, theDY); }
21   void SetDZ(double theDZ) { _func->SetReal(VEC_ARG_DZ, theDZ); }
22
23   double GetDX() { return _func->GetReal(VEC_ARG_DX); }
24   double GetDY() { return _func->GetReal(VEC_ARG_DY); }
25   double GetDZ() { return _func->GetReal(VEC_ARG_DZ); }
26
27   void SetPoint1(Handle(GEOM_Function) theRef) { _func->SetReference(VEC_ARG_PNT1, theRef); }
28   void SetPoint2(Handle(GEOM_Function) theRef) { _func->SetReference(VEC_ARG_PNT2, theRef); }
29
30   Handle(GEOM_Function) GetPoint1() { return _func->GetReference(VEC_ARG_PNT1); }
31   Handle(GEOM_Function) GetPoint2() { return _func->GetReference(VEC_ARG_PNT2); }
32
33  private:
34
35   Handle(GEOM_Function) _func;
36 };