1 // File: GeomAPI_Dir2d.hxx
2 // Created: 23 Apr 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef GeomAPI_Dir2d_H_
6 #define GeomAPI_Dir2d_H_
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
13 /**\class GeomAPI_Dir2d
15 * \brief 2D direction defined by three normalized coordinates
18 class GEOMAPI_EXPORT GeomAPI_Dir2d : public GeomAPI_Interface
21 /// Creation of direction by coordinates
22 GeomAPI_Dir2d(const double theX, const double theY);
23 /// Creation of direction by coordinates
24 GeomAPI_Dir2d(const boost::shared_ptr<GeomAPI_XY>& theCoords);
26 /// returns X coordinate
28 /// returns Y coordinate
31 /// returns coordinates of the direction
32 const boost::shared_ptr<GeomAPI_XY> xy();
34 /// result is a scalar product of directions
35 double dot(const boost::shared_ptr<GeomAPI_Dir2d>& theArg) const;
36 /// result is a cross product of two directions
37 double cross(const boost::shared_ptr<GeomAPI_Dir2d>& theArg) const;