1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 //NOTE: This is an interface to a function for the local coordinate system creation.
24 #include "GEOM_Function.hxx"
38 #define CS_ARG_SHAPE 10
39 #define CS_ARG_ORIGIN 11
40 #define CS_ARG_XVEC 12
41 #define CS_ARG_YVEC 13
43 class GEOMImpl_IMarker
47 GEOMImpl_IMarker(Handle(GEOM_Function) theFunction): _func(theFunction) {}
49 void SetOrigin (const double theX, const double theY, const double theZ)
51 _func->SetReal(CS_ARG_O_X, theX);
52 _func->SetReal(CS_ARG_O_Y, theY);
53 _func->SetReal(CS_ARG_O_Z, theZ);
56 void SetXDir (const double theDX, const double theDY, const double theDZ)
58 _func->SetReal(CS_ARG_X_DX, theDX);
59 _func->SetReal(CS_ARG_X_DY, theDY);
60 _func->SetReal(CS_ARG_X_DZ, theDZ);
63 void SetYDir (const double theDX, const double theDY, const double theDZ)
65 _func->SetReal(CS_ARG_Y_DX, theDX);
66 _func->SetReal(CS_ARG_Y_DY, theDY);
67 _func->SetReal(CS_ARG_Y_DZ, theDZ);
70 void SetShape (Handle(GEOM_Function) theShape)
72 _func->SetReference(CS_ARG_SHAPE, theShape);
75 void SetOrigin (Handle(GEOM_Function) theOrigin)
77 _func->SetReference(CS_ARG_ORIGIN, theOrigin);
80 void SetXVec (Handle(GEOM_Function) theXVec)
82 _func->SetReference(CS_ARG_XVEC, theXVec);
85 void SetYVec (Handle(GEOM_Function) theYVec)
87 _func->SetReference(CS_ARG_YVEC, theYVec);
90 void GetOrigin (double& theX, double& theY, double& theZ)
92 theX = _func->GetReal(CS_ARG_O_X);
93 theY = _func->GetReal(CS_ARG_O_Y);
94 theZ = _func->GetReal(CS_ARG_O_Z);
97 void GetXDir (double& theDX, double& theDY, double& theDZ)
99 theDX = _func->GetReal(CS_ARG_X_DX);
100 theDY = _func->GetReal(CS_ARG_X_DY);
101 theDZ = _func->GetReal(CS_ARG_X_DZ);
104 void GetYDir (double& theDX, double& theDY, double& theDZ)
106 theDX = _func->GetReal(CS_ARG_Y_DX);
107 theDY = _func->GetReal(CS_ARG_Y_DY);
108 theDZ = _func->GetReal(CS_ARG_Y_DZ);
111 Handle(GEOM_Function) GetShape()
113 return _func->GetReference(CS_ARG_SHAPE);
116 Handle(GEOM_Function) GetOrigin()
118 return _func->GetReference(CS_ARG_ORIGIN);
121 Handle(GEOM_Function) GetXVec()
123 return _func->GetReference(CS_ARG_XVEC);
126 Handle(GEOM_Function) GetYVec()
128 return _func->GetReference(CS_ARG_YVEC);
133 Handle(GEOM_Function) _func;