SHAPER
9.12.0
|
Line in 2D. More...
Public Member Functions | |
GEOMAPI_EXPORT | GeomAPI_Lin2d (const double theStartX, const double theStartY, const double theEndX, const double theEndY) |
Creation of line defined by cordinates of start and end points. More... | |
GEOMAPI_EXPORT | GeomAPI_Lin2d (const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd) |
Creation of line defined by start and end points. More... | |
GEOMAPI_EXPORT | GeomAPI_Lin2d (const std::shared_ptr< GeomAPI_Pnt2d > &theOrigin, const std::shared_ptr< GeomAPI_Dir2d > &theDirection) |
Creation of line defined by origin and direction. More... | |
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > | location () |
Returns point on the line (first point) More... | |
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Dir2d > | direction () |
Returns a line direction. More... | |
GEOMAPI_EXPORT double | distance (const std::shared_ptr< GeomAPI_Pnt2d > &theOther) const |
Distance between two points. More... | |
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2d > | intersect (const std::shared_ptr< GeomAPI_Lin2d > &theLine) const |
Intersection of two lines. More... | |
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2d > | project (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint) const |
Project point on line. More... | |
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. More... | |
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2d > | shiftedLocation (double theShift) const |
Returns a location point shifted on theShift in perpendicular direction. More... | |
template<class T > | |
T * | implPtr () |
Returns the pointer to the impl. More... | |
template<class T > | |
const T * | implPtr () const |
Returns the pointer to the impl. More... | |
template<class T > | |
const T & | impl () const |
Returns the reference object of the impl. More... | |
template<class T > | |
void | setImpl (T *theImpl) |
Updates the impl (deletes the old one) More... | |
GEOMAPI_EXPORT bool | empty () const |
Returns true if the impl is empty. More... | |
Line in 2D.
GeomAPI_Lin2d::GeomAPI_Lin2d | ( | const double | theStartX, |
const double | theStartY, | ||
const double | theEndX, | ||
const double | theEndY | ||
) |
Creation of line defined by cordinates of start and end points.
GeomAPI_Lin2d::GeomAPI_Lin2d | ( | const std::shared_ptr< GeomAPI_Pnt2d > & | theStart, |
const std::shared_ptr< GeomAPI_Pnt2d > & | theEnd | ||
) |
Creation of line defined by start and end points.
GeomAPI_Lin2d::GeomAPI_Lin2d | ( | const std::shared_ptr< GeomAPI_Pnt2d > & | theOrigin, |
const std::shared_ptr< GeomAPI_Dir2d > & | theDirection | ||
) |
Creation of line defined by origin and direction.
std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Lin2d::location | ( | ) |
Returns point on the line (first point)
std::shared_ptr< GeomAPI_Dir2d > GeomAPI_Lin2d::direction | ( | ) |
Returns a line direction.
double GeomAPI_Lin2d::distance | ( | const std::shared_ptr< GeomAPI_Pnt2d > & | theOther | ) | const |
Distance between two points.
const std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Lin2d::intersect | ( | const std::shared_ptr< GeomAPI_Lin2d > & | theLine | ) | const |
Intersection of two lines.
const std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Lin2d::project | ( | const std::shared_ptr< GeomAPI_Pnt2d > & | thePoint | ) | const |
Project point on line.
bool GeomAPI_Lin2d::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.
std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Lin2d::shiftedLocation | ( | double | theShift | ) | const |
Returns a location point shifted on theShift in perpendicular direction.
|
inlineinherited |
Returns the pointer to the impl.
|
inlineinherited |
Returns the pointer to the impl.
|
inlineinherited |
Returns the reference object of the impl.
|
inlineinherited |
Updates the impl (deletes the old one)
|
inherited |
Returns true if the impl is empty.