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_EXPORT GeomAPI_Dir2d : public GeomAPI_Interface
23 /// Creation of direction by coordinates
24 GeomAPI_Dir2d(const double theX, const double theY);
25 /// Creation of direction by coordinates
26 GeomAPI_Dir2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
28 /// returns X coordinate
30 /// returns Y coordinate
33 /// returns coordinates of the direction
34 const std::shared_ptr<GeomAPI_XY> xy();
36 /// result is a scalar product of directions
37 double dot(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
38 /// result is a cross product of two directions
39 double cross(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
41 /// calculates angle between two directions
42 double angle(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;