1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomData_Dir.h
4 // Created: 24 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomData_Dir_H_
8 #define GeomData_Dir_H_
11 #include "GeomDataAPI_Dir.h"
12 #include <TDataStd_RealArray.hxx>
13 #include <TDF_Label.hxx>
19 /**\class GeomData_Dir
21 * \brief Attribute that contains direction.
23 class GeomData_Dir : public GeomDataAPI_Dir
25 Handle_TDataStd_RealArray myCoords; ///< X, Y and Z doubles as real array attribute [0; 2]
27 /// Defines the double value
28 GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
29 /// Defines the direction
30 GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir);
32 /// Returns the X double value
33 GEOMDATA_EXPORT virtual double x() const;
34 /// Returns the Y double value
35 GEOMDATA_EXPORT virtual double y() const;
36 /// Returns the Z double value
37 GEOMDATA_EXPORT virtual double z() const;
38 /// Returns the direction of this attribute
39 GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Dir> dir();
40 /// Returns the coordinates of this attribute
41 GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_XYZ> xyz();
44 /// Initializes attributes
45 GEOMDATA_EXPORT GeomData_Dir(TDF_Label& theLabel);
47 friend class Model_Data;