1 // Copyright (C) 2014-2019 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 email : webmaster.salome@opencascade.com
20 #ifndef GeomDataAPI_Dir_H_
21 #define GeomDataAPI_Dir_H_
23 #include "GeomDataAPI.h"
24 #include <ModelAPI_Attribute.h>
29 /**\class GeomDataAPI_Dir
31 * \brief Attribute that contains 3D direction coordinates.
34 class GeomDataAPI_Dir : public ModelAPI_Attribute
37 /// Defines the double value
38 virtual void setValue(const double theX, const double theY, const double theZ) = 0;
39 /// Defines the direction
40 virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir) = 0;
42 /// Returns the X double value
43 virtual double x() const = 0;
44 /// Returns the Y double value
45 virtual double y() const = 0;
46 /// Returns the Z double value
47 virtual double z() const = 0;
48 /// Returns the direction of this attribute
49 virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
50 /// Returns the coordinates of this attribute
51 virtual std::shared_ptr<GeomAPI_XYZ> xyz() = 0;
53 /// Returns the type of this class of attributes
54 static std::string typeId()
56 return std::string("Dir");
59 /// Returns the type of this class of attributes, not static method
60 GEOMDATAAPI_EXPORT virtual std::string attributeType();
63 /// Objects are created for features automatically
64 GEOMDATAAPI_EXPORT GeomDataAPI_Dir();
65 GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Dir();
68 //! Pointer on attribute object
69 typedef std::shared_ptr<GeomDataAPI_Dir> AttributeDirPtr;