QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Public Member Functions | List of all members
QgsRay2D Class Reference

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. More...
 
bool intersects (const QgsLineSegment2D &segment, QgsPointXY &intersectPoint) const
 Finds the closest intersection point of the ray and a line segment. More...
 

Detailed Description

A 2D ray which extends from an origin point to an infinite distance in a given direction.

Note
not available in Python bindings
Since
QGIS 3.2

Definition at line 223 of file qgsinternalgeometryengine.h.

Constructor & Destructor Documentation

◆ QgsRay2D()

QgsRay2D::QgsRay2D ( const QgsPointXY origin,
QgsVector  direction 
)
inline

Constructor for a ray starting at the given origin and extending an infinite distance in the specified direction.

Definition at line 231 of file qgsinternalgeometryengine.h.

Member Function Documentation

◆ intersects()

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 830 of file qgsinternalgeometryengine.cpp.


The documentation for this class was generated from the following files: