Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / GeomData / GeomData_Point.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomData_Point.h
4 // Created:     24 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomData_Point_H_
8 #define GeomData_Point_H_
9
10 #include "GeomData.h"
11 #include "GeomDataAPI_Point.h"
12 #include <TDataStd_RealArray.hxx>
13 #include <TDF_Label.hxx>
14
15 /**\class GeomData_Point
16  * \ingroup DataModel
17  * \brief Attribute that contains 3D point.
18  */
19
20 class GeomData_Point : public GeomDataAPI_Point
21 {
22   Handle_TDataStd_RealArray myCoords;  ///< X, Y and Z doubles as real array attribute [0; 2]
23  public:
24   /// Defines the double value
25   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
26   /// Defines the point
27   GEOMDATA_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint);
28
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 Z double value
34   GEOMDATA_EXPORT virtual double z() const;
35   /// Returns the 3D point
36   GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> pnt();
37
38  protected:
39   /// Initializes attributes
40   GEOMDATA_EXPORT GeomData_Point(TDF_Label& theLabel);
41
42   friend class Model_Data;
43 };
44
45 #endif