1 // Copyright (C) 2007-2010 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
23 //NOTE: This is an interface to a function for the local coordinate system creation.
25 #include "GEOM_Function.hxx"
39 #define CS_ARG_SHAPE 10
40 #define CS_ARG_ORIGIN 11
41 #define CS_ARG_XVEC 12
42 #define CS_ARG_YVEC 13
44 class GEOMImpl_IMarker
48 GEOMImpl_IMarker(Handle(GEOM_Function) theFunction): _func(theFunction) {}
50 void SetOrigin (const double theX, const double theY, const double theZ)
52 _func->SetReal(CS_ARG_O_X, theX);
53 _func->SetReal(CS_ARG_O_Y, theY);
54 _func->SetReal(CS_ARG_O_Z, theZ);
57 void SetXDir (const double theDX, const double theDY, const double theDZ)
59 _func->SetReal(CS_ARG_X_DX, theDX);
60 _func->SetReal(CS_ARG_X_DY, theDY);
61 _func->SetReal(CS_ARG_X_DZ, theDZ);
64 void SetYDir (const double theDX, const double theDY, const double theDZ)
66 _func->SetReal(CS_ARG_Y_DX, theDX);
67 _func->SetReal(CS_ARG_Y_DY, theDY);
68 _func->SetReal(CS_ARG_Y_DZ, theDZ);
71 void SetShape (Handle(GEOM_Function) theShape)
73 _func->SetReference(CS_ARG_SHAPE, theShape);
76 void SetOrigin (Handle(GEOM_Function) theOrigin)
78 _func->SetReference(CS_ARG_ORIGIN, theOrigin);
81 void SetXVec (Handle(GEOM_Function) theXVec)
83 _func->SetReference(CS_ARG_XVEC, theXVec);
86 void SetYVec (Handle(GEOM_Function) theYVec)
88 _func->SetReference(CS_ARG_YVEC, theYVec);
91 void GetOrigin (double& theX, double& theY, double& theZ)
93 theX = _func->GetReal(CS_ARG_O_X);
94 theY = _func->GetReal(CS_ARG_O_Y);
95 theZ = _func->GetReal(CS_ARG_O_Z);
98 void GetXDir (double& theDX, double& theDY, double& theDZ)
100 theDX = _func->GetReal(CS_ARG_X_DX);
101 theDY = _func->GetReal(CS_ARG_X_DY);
102 theDZ = _func->GetReal(CS_ARG_X_DZ);
105 void GetYDir (double& theDX, double& theDY, double& theDZ)
107 theDX = _func->GetReal(CS_ARG_Y_DX);
108 theDY = _func->GetReal(CS_ARG_Y_DY);
109 theDZ = _func->GetReal(CS_ARG_Y_DZ);
112 Handle(GEOM_Function) GetShape()
114 return _func->GetReference(CS_ARG_SHAPE);
117 Handle(GEOM_Function) GetOrigin()
119 return _func->GetReference(CS_ARG_ORIGIN);
122 Handle(GEOM_Function) GetXVec()
124 return _func->GetReference(CS_ARG_XVEC);
127 Handle(GEOM_Function) GetYVec()
129 return _func->GetReference(CS_ARG_YVEC);
134 Handle(GEOM_Function) _func;