1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef GeomDataAPI_Dir_H_
22 #define GeomDataAPI_Dir_H_
24 #include "GeomDataAPI.h"
25 #include <ModelAPI_Attribute.h>
30 /**\class GeomDataAPI_Dir
32 * \brief Attribute that contains 3D direction coordinates.
35 class GeomDataAPI_Dir : public ModelAPI_Attribute
38 /// Defines the double value
39 virtual void setValue(const double theX, const double theY, const double theZ) = 0;
40 /// Defines the direction
41 virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir) = 0;
43 /// Returns the X double value
44 virtual double x() const = 0;
45 /// Returns the Y double value
46 virtual double y() const = 0;
47 /// Returns the Z double value
48 virtual double z() const = 0;
49 /// Returns the direction of this attribute
50 virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
51 /// Returns the coordinates of this attribute
52 virtual std::shared_ptr<GeomAPI_XYZ> xyz() = 0;
54 /// Returns the type of this class of attributes
55 static std::string typeId()
57 return std::string("Dir");
60 /// Returns the type of this class of attributes, not static method
61 GEOMDATAAPI_EXPORT virtual std::string attributeType();
64 /// Objects are created for features automatically
65 GEOMDATAAPI_EXPORT GeomDataAPI_Dir();
66 GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Dir();
69 //! Pointer on attribute object
70 typedef std::shared_ptr<GeomDataAPI_Dir> AttributeDirPtr;