Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / GeomAPI / GeomAPI_Dir2d.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Dir2d.hxx
4 // Created:     23 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomAPI_Dir2d_H_
8 #define GeomAPI_Dir2d_H_
9
10 #include <GeomAPI_Interface.h>
11 #include <memory>
12
13 class GeomAPI_XY;
14
15 /**\class GeomAPI_Dir2d
16  * \ingroup DataModel
17  * \brief 2D direction defined by three normalized coordinates
18  */
19
20 class GEOMAPI_EXPORT GeomAPI_Dir2d : public GeomAPI_Interface
21 {
22  public:
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);
27
28   /// returns X coordinate
29   double x() const;
30   /// returns Y coordinate
31   double y() const;
32
33   /// returns coordinates of the direction
34   const std::shared_ptr<GeomAPI_XY> xy();
35
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;
40 };
41
42 #endif
43