1 // File: GeomAPI_XY.hxx
2 // Created: 30 May 2014
3 // Author: Artem ZHIDKOV
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
13 * \brief 2 coordinates: they may represent vector or point or something else
16 class GEOMAPI_EXPORT GeomAPI_XY : public GeomAPI_Interface
19 /// Creation by coordinates
20 GeomAPI_XY(const double theX, const double theY);
22 /// returns X coordinate
24 /// returns Y coordinate
28 void setX(const double theX);
30 void setY(const double theY);
32 /// result is sum of coordinates of this and the given argument
33 const boost::shared_ptr<GeomAPI_XY> added(const boost::shared_ptr<GeomAPI_XY>& theArg);
34 /// result is coordinates multiplied by the argument
35 const boost::shared_ptr<GeomAPI_XY> multiplied(const double theArg);
37 /// result is a scalar product of two triplets
38 double dot(const boost::shared_ptr<GeomAPI_XY>& theArg) const;
39 /// result is a cross product of two triplets
40 double cross(const boost::shared_ptr<GeomAPI_XY>& theArg) const;
42 /// Distance between two pairs
43 double distance(const boost::shared_ptr<GeomAPI_XY>& theOther) const;