20 #ifndef GeomAPI_Dir_H_
21 #define GeomAPI_Dir_H_
23 #include <GeomAPI_Interface.h>
38 GeomAPI_Dir(
const double theX,
const double theY,
const double theZ);
41 GeomAPI_Dir(
const std::shared_ptr<GeomAPI_XYZ>& theCoords);
55 const std::shared_ptr<GeomAPI_XYZ>
xyz();
62 double dot(
const std::shared_ptr<GeomAPI_Dir>& theArg)
const;
65 const std::shared_ptr<GeomAPI_XYZ>
cross(
const std::shared_ptr<GeomAPI_Dir>& theArg)
const;
69 double angle(
const std::shared_ptr<GeomAPI_Dir>& theArg)
const;
74 bool isParallel(
const std::shared_ptr<GeomAPI_Dir> theDir,
75 const double theTolerance = 1.e-7)
const;
81 typedef std::shared_ptr<GeomAPI_Dir> GeomDirPtr;
3D direction defined by three normalized coordinates
Definition: GeomAPI_Dir.h:34
GEOMAPI_EXPORT double y() const
returns Y coordinate
Definition: GeomAPI_Dir.cpp:42
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYZ > xyz()
returns coordinates of the direction
Definition: GeomAPI_Dir.cpp:52
GEOMAPI_EXPORT double x() const
returns X coordinate
Definition: GeomAPI_Dir.cpp:37
GEOMAPI_EXPORT double dot(const std::shared_ptr< GeomAPI_Dir > &theArg) const
result is a scalar product of directions
Definition: GeomAPI_Dir.cpp:62
GEOMAPI_EXPORT double z() const
returns Z coordinate
Definition: GeomAPI_Dir.cpp:47
GEOMAPI_EXPORT void reverse()
inverses the direction
Definition: GeomAPI_Dir.cpp:57
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_XYZ > cross(const std::shared_ptr< GeomAPI_Dir > &theArg) const
result is a cross product of two directions
Definition: GeomAPI_Dir.cpp:67
GEOMAPI_EXPORT double angle(const std::shared_ptr< GeomAPI_Dir > &theArg) const
calculates angle between two directions
Definition: GeomAPI_Dir.cpp:74
GEOMAPI_EXPORT bool isParallel(const std::shared_ptr< GeomAPI_Dir > theDir, const double theTolerance=1.e-7) const
Definition: GeomAPI_Dir.cpp:79
GEOMAPI_EXPORT GeomAPI_Dir(const double theX, const double theY, const double theZ)
Creation of direction by coordinates.
Definition: GeomAPI_Dir.cpp:27
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
3 coordinates: they may represent vector or point or something else
Definition: GeomAPI_XYZ.h:32