1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_XY.hxx
4 // Created: 30 May 2014
5 // Author: Artem ZHIDKOV
10 #include <GeomAPI_Interface.h>
15 * \brief 2 coordinates: they may represent vector or point or something else
18 class GeomAPI_XY : public GeomAPI_Interface
21 /// Creation by coordinates
23 GeomAPI_XY(const double theX, const double theY);
25 /// returns X coordinate
28 /// returns Y coordinate
34 void setX(const double theX);
37 void setY(const double theY);
39 /// result is sum of coordinates of this and the given argument
41 const std::shared_ptr<GeomAPI_XY> added(const std::shared_ptr<GeomAPI_XY>& theArg);
42 /// result is difference between coordinates of this and the given argument
44 const std::shared_ptr<GeomAPI_XY> decreased(const std::shared_ptr<GeomAPI_XY>& theArg);
45 /// result is coordinates multiplied by the argument
47 const std::shared_ptr<GeomAPI_XY> multiplied(const double theArg);
49 /// result is a scalar product of two triplets
51 double dot(const std::shared_ptr<GeomAPI_XY>& theArg) const;
52 /// result is a cross product of two triplets
54 double cross(const std::shared_ptr<GeomAPI_XY>& theArg) const;
56 /// Distance between two pairs
58 double distance(const std::shared_ptr<GeomAPI_XY>& theOther) const;