X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Pnt2d.h;h=ad8248576dcdcae9e3defcaa580735921aecc0e0;hb=f3ad05e50c4a462c08c31990706c8cc6acc646ac;hp=7d1716cb000551f4253128e41e2252540ee51e29;hpb=35a88fdd724349275bbff32b9596a44e7cd422e2;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Pnt2d.h b/src/GeomAPI/GeomAPI_Pnt2d.h index 7d1716cb0..ad8248576 100644 --- a/src/GeomAPI/GeomAPI_Pnt2d.h +++ b/src/GeomAPI/GeomAPI_Pnt2d.h @@ -1,6 +1,21 @@ -// File: GeomAPI_Pnt2d.h -// Created: 29 May 2014 -// Author: Artem ZHIDKOV +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef GeomAPI_Pnt2d_H_ #define GeomAPI_Pnt2d_H_ @@ -17,38 +32,51 @@ class GeomAPI_Dir; * \brief 2D point defined by two coordinates */ -class GEOMAPI_EXPORT GeomAPI_Pnt2d : public GeomAPI_Interface +class GeomAPI_Pnt2d : public GeomAPI_Interface { public: /// Creation of point by coordinates + GEOMAPI_EXPORT GeomAPI_Pnt2d(const double theX, const double theY); /// Creation of point by coordinates + GEOMAPI_EXPORT GeomAPI_Pnt2d(const std::shared_ptr& theCoords); /// returns X coordinate + GEOMAPI_EXPORT double x() const; /// returns Y coordinate + GEOMAPI_EXPORT double y() const; /// sets X coordinate + GEOMAPI_EXPORT void setX(const double theX); /// sets Y coordinate + GEOMAPI_EXPORT void setY(const double theY); /// Returns the 3D point + GEOMAPI_EXPORT std::shared_ptr to3D(const std::shared_ptr& theOrigin, const std::shared_ptr& theDirX, const std::shared_ptr& theDirY); /// returns coordinates of the point + GEOMAPI_EXPORT const std::shared_ptr xy(); /// Distance between two points + GEOMAPI_EXPORT double distance(const std::shared_ptr& theOther) const; /// Returns whether the distance between two points is less then precision confusion + GEOMAPI_EXPORT bool isEqual(const std::shared_ptr& theOther) const; }; +//! Pointer on the object +typedef std::shared_ptr GeomPnt2dPtr; + #endif