QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
A 2D ray which extends from an origin point to an infinite distance in a given direction. More...
#include <qgsinternalgeometryengine.h>
Public Member Functions | |
QgsRay2D (const QgsPointXY &origin, QgsVector direction) | |
Constructor for a ray starting at the given origin and extending an infinite distance in the specified direction. | |
bool | intersects (const QgsLineSegment2D &segment, QgsPointXY &intersectPoint) const |
Finds the closest intersection point of the ray and a line segment. | |
A 2D ray which extends from an origin point to an infinite distance in a given direction.
Definition at line 358 of file qgsinternalgeometryengine.h.
|
inline |
Constructor for a ray starting at the given origin and extending an infinite distance in the specified direction.
Definition at line 366 of file qgsinternalgeometryengine.h.
PRIVATE bool QgsRay2D::intersects | ( | const QgsLineSegment2D & | segment, |
QgsPointXY & | intersectPoint | ||
) | const |
Finds the closest intersection point of the ray and a line segment.
If found, the intersection point will be stored in intersectPoint.
Returns true
if the ray intersects the line segment.
Definition at line 973 of file qgsinternalgeometryengine.cpp.