Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IMarker.hxx
1 //NOTE: This is an interface to a function for the local coordinate system creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define CS_ARG_O_X   1
7 #define CS_ARG_O_Y   2
8 #define CS_ARG_O_Z   3
9
10 #define CS_ARG_X_DX  4
11 #define CS_ARG_X_DY  5
12 #define CS_ARG_X_DZ  6
13
14 #define CS_ARG_Y_DX  7
15 #define CS_ARG_Y_DY  8
16 #define CS_ARG_Y_DZ  9
17
18 class GEOMImpl_IMarker
19 {
20  public:
21
22   GEOMImpl_IMarker(Handle(GEOM_Function) theFunction): _func(theFunction) {}
23
24   void SetOrigin (const double theX, const double theY, const double theZ)
25   {
26     _func->SetReal(CS_ARG_O_X, theX);
27     _func->SetReal(CS_ARG_O_Y, theY);
28     _func->SetReal(CS_ARG_O_Z, theZ);
29   }
30
31   void SetXDir (const double theDX, const double theDY, const double theDZ)
32   {
33     _func->SetReal(CS_ARG_X_DX, theDX);
34     _func->SetReal(CS_ARG_X_DY, theDY);
35     _func->SetReal(CS_ARG_X_DZ, theDZ);
36   }
37
38   void SetYDir (const double theDX, const double theDY, const double theDZ)
39   {
40     _func->SetReal(CS_ARG_Y_DX, theDX);
41     _func->SetReal(CS_ARG_Y_DY, theDY);
42     _func->SetReal(CS_ARG_Y_DZ, theDZ);
43   }
44
45   void GetOrigin (double& theX, double& theY, double& theZ)
46   {
47     theX = _func->GetReal(CS_ARG_O_X);
48     theY = _func->GetReal(CS_ARG_O_Y);
49     theZ = _func->GetReal(CS_ARG_O_Z);
50   }
51
52   void GetXDir (double& theDX, double& theDY, double& theDZ)
53   {
54     theDX = _func->GetReal(CS_ARG_X_DX);
55     theDY = _func->GetReal(CS_ARG_X_DY);
56     theDZ = _func->GetReal(CS_ARG_X_DZ);
57   }
58
59   void GetYDir (double& theDX, double& theDY, double& theDZ)
60   {
61     theDX = _func->GetReal(CS_ARG_Y_DX);
62     theDY = _func->GetReal(CS_ARG_Y_DY);
63     theDZ = _func->GetReal(CS_ARG_Y_DZ);
64   }
65
66  private:
67
68   Handle(GEOM_Function) _func;
69 };