1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Dir.hxx
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
10 #include <GeomAPI_Interface.h>
17 * \brief 3D direction defined by three normalized coordinates
20 class GeomAPI_Dir : public GeomAPI_Interface
23 /// Creation of direction by coordinates
25 GeomAPI_Dir(const double theX, const double theY, const double theZ);
26 /// Creation of direction by coordinates
28 GeomAPI_Dir(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
30 /// returns X coordinate
33 /// returns Y coordinate
36 /// returns Z coordinate
40 /// returns coordinates of the direction
42 const std::shared_ptr<GeomAPI_XYZ> xyz();
44 /// inverses the direction
45 GEOMAPI_EXPORT void reverse();
47 /// result is a scalar product of directions
49 double dot(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
50 /// result is a cross product of two directions
52 const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
54 /// calculates angle between two directions
56 double angle(const std::shared_ptr<GeomAPI_Dir>& theArg) const;