1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Dir2d.hxx
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomAPI_Dir2d_H_
8 #define GeomAPI_Dir2d_H_
10 #include <GeomAPI_Interface.h>
15 /**\class GeomAPI_Dir2d
17 * \brief 2D direction defined by three normalized coordinates
20 class GeomAPI_Dir2d : public GeomAPI_Interface
23 /// Creation of direction by coordinates
25 GeomAPI_Dir2d(const double theX, const double theY);
26 /// Creation of direction by coordinates
28 GeomAPI_Dir2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
30 /// returns X coordinate
33 /// returns Y coordinate
37 /// returns coordinates of the direction
39 const std::shared_ptr<GeomAPI_XY> xy();
41 /// inverses the direction
42 GEOMAPI_EXPORT void reverse();
44 /// result is a scalar product of directions
46 double dot(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
47 /// result is a cross product of two directions
49 double cross(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
51 /// calculates angle between two directions
53 double angle(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;