20 #ifndef GeomAPI_Lin2d_H_
21 #define GeomAPI_Lin2d_H_
23 #include <GeomAPI_Interface.h>
39 GeomAPI_Lin2d(
const double theStartX,
const double theStartY,
const double theEndX,
40 const double theEndY);
44 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd);
47 GeomAPI_Lin2d(
const std::shared_ptr<GeomAPI_Pnt2d>& theOrigin,
48 const std::shared_ptr<GeomAPI_Dir2d>& theDirection);
52 std::shared_ptr<GeomAPI_Pnt2d>
location();
56 std::shared_ptr<GeomAPI_Dir2d>
direction();
60 double distance(
const std::shared_ptr<GeomAPI_Pnt2d>& theOther)
const;
63 const std::shared_ptr<GeomAPI_Pnt2d>
intersect(
64 const std::shared_ptr<GeomAPI_Lin2d>& theLine)
const;
67 const std::shared_ptr<GeomAPI_Pnt2d>
project(
68 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
const;
72 bool isRight(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint)
const;
81 typedef std::shared_ptr<GeomAPI_Lin2d> GeomLine2dPtr;
2D direction defined by three normalized coordinates
Definition: GeomAPI_Dir2d.h:34
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
Line in 2D.
Definition: GeomAPI_Lin2d.h:35
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Dir2d > direction()
Returns a line direction.
Definition: GeomAPI_Lin2d.cpp:68
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > location()
Returns point on the line (first point)
Definition: GeomAPI_Lin2d.cpp:62
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2d > project(const std::shared_ptr< GeomAPI_Pnt2d > &thePoint) const
Project point on line.
Definition: GeomAPI_Lin2d.cpp:89
GEOMAPI_EXPORT double distance(const std::shared_ptr< GeomAPI_Pnt2d > &theOther) const
Distance between two points.
Definition: GeomAPI_Lin2d.cpp:74
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > shiftedLocation(double theShift) const
Returns a location point shifted on theShift in perpendicular direction.
Definition: GeomAPI_Lin2d.cpp:111
GEOMAPI_EXPORT GeomAPI_Lin2d(const double theStartX, const double theStartY, const double theEndX, const double theEndY)
Creation of line defined by coordinates of start and end points.
Definition: GeomAPI_Lin2d.cpp:42
GEOMAPI_EXPORT bool isRight(const std::shared_ptr< GeomAPI_Pnt2d > &thePoint) const
Computes the cross product of the line direction and a vector from the line start point to the point.
Definition: GeomAPI_Lin2d.cpp:101
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2d > intersect(const std::shared_ptr< GeomAPI_Lin2d > &theLine) const
Intersection of two lines.
Definition: GeomAPI_Lin2d.cpp:79
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36