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