1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomData_Point2D.h
4 // Created: 24 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomData_Point2D_H_
8 #define GeomData_Point2D_H_
11 #include "GeomDataAPI_Point2D.h"
12 #include <TDataStd_RealArray.hxx>
13 #include <TDF_Label.hxx>
15 /**\class GeomData_Point2D
17 * \brief Attribute that contains 2D point.
20 class GeomData_Point2D : public GeomDataAPI_Point2D
22 Handle_TDataStd_RealArray myCoords; ///< X and Y doubles as real array attribute [0; 1]
24 /// Defines the double value
25 GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY);
27 GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
29 /// Returns the X double value
30 GEOMDATA_EXPORT virtual double x() const;
31 /// Returns the Y double value
32 GEOMDATA_EXPORT virtual double y() const;
33 /// Returns the 2D point
34 GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Pnt2d> pnt();
37 /// Initializes attributes
38 GEOMDATA_EXPORT GeomData_Point2D(TDF_Label& theLabel);
40 friend class Model_Data;