X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Pnt2d.h;h=bd0000fdb867d2e0bc919862bf41f599db18cf8b;hb=0448acdd8e8c1e1638a2cf861e42e915966b2034;hp=a1faf626c561b1e5df015cb502575af70cbab1c4;hpb=81dad1acf409fa5e71090501bc1aa7e0b7d80cde;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Pnt2d.h b/src/GeomAPI/GeomAPI_Pnt2d.h index a1faf626c..bd0000fdb 100644 --- a/src/GeomAPI/GeomAPI_Pnt2d.h +++ b/src/GeomAPI/GeomAPI_Pnt2d.h @@ -1,27 +1,31 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_Pnt2d.h // Created: 29 May 2014 // Author: Artem ZHIDKOV -#ifndef GeomAPI_Pnt2d_HeaderFile -#define GeomAPI_Pnt2d_HeaderFile +#ifndef GeomAPI_Pnt2d_H_ +#define GeomAPI_Pnt2d_H_ #include -#include +#include class GeomAPI_XY; +class GeomAPI_Pnt; +class GeomAPI_Dir; /**\class GeomAPI_Pnt2d * \ingroup DataModel * \brief 2D point defined by two coordinates */ -class GEOMAPI_EXPORT GeomAPI_Pnt2d: public GeomAPI_Interface +class GEOMAPI_EXPORT GeomAPI_Pnt2d : public GeomAPI_Interface { -public: + public: /// Creation of point by coordinates GeomAPI_Pnt2d(const double theX, const double theY); /// Creation of point by coordinates - GeomAPI_Pnt2d(const boost::shared_ptr& theCoords); + GeomAPI_Pnt2d(const std::shared_ptr& theCoords); /// returns X coordinate double x() const; @@ -33,11 +37,19 @@ public: /// sets Y coordinate void setY(const double theY); + /// Returns the 3D point + std::shared_ptr to3D(const std::shared_ptr& theOrigin, + const std::shared_ptr& theDirX, + const std::shared_ptr& theDirY); + /// returns coordinates of the point - const boost::shared_ptr xy(); + const std::shared_ptr xy(); /// Distance between two points - double distance(const boost::shared_ptr& theOther) const; + double distance(const std::shared_ptr& theOther) const; + + /// Returns whether the distance between two points is less then precision confusion + bool isEqual(const std::shared_ptr& theOther) const; }; #endif