Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / GeomAPI / GeomAPI_Lin.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Lin.h
4 // Created:     29 May 2014
5 // Author:      Artem ZHIDKOV
6
7 #ifndef GeomAPI_Lin_H_
8 #define GeomAPI_Lin_H_
9
10 #include <GeomAPI_Interface.h>
11 #include <memory>
12
13 class GeomAPI_Pnt;
14
15 /**\class GeomAPI_Lin
16  * \ingroup DataModel
17  * \brief Line in 3D
18  */
19
20 class GEOMAPI_EXPORT GeomAPI_Lin : public GeomAPI_Interface
21 {
22  public:
23   /// Creation of line defined by cordinates of start and end points
24   GeomAPI_Lin(const double theStartX, const double theStartY, const double theStartZ,
25               const double theEndX, const double theEndY, const double theEndZ);
26   /// Creation of line defined by start and end points
27   GeomAPI_Lin(const std::shared_ptr<GeomAPI_Pnt>& theStart,
28               const std::shared_ptr<GeomAPI_Pnt>& theEnd);
29
30   /// Distance between two points
31   double distance(const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
32   /// Intersection of two lines
33   const std::shared_ptr<GeomAPI_Pnt> intersect(
34       const std::shared_ptr<GeomAPI_Lin>& theLine) const;
35   /// Project point on line
36   const std::shared_ptr<GeomAPI_Pnt> project(
37       const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
38 };
39
40 #endif
41