QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsRayCastContext Class Reference

Responsible for defining parameters of the ray casting operations in 3D map canvases. More...

#include <qgsraycastcontext.h>

Public Member Functions

 QgsRayCastContext ()=default
float angleThreshold () const
 Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.
float maximumDistance () const
 The maximum distance from ray origin to look for hits when casting a ray.
void setAngleThreshold (float angle)
 Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.
void setMaximumDistance (float distance)
 Sets the maximum distance from ray origin to look for hits when casting a ray.
void setSingleResult (bool enable)
 Sets whether to fetch only the closest hit for each layer or entity type.
bool singleResult () const
 Returns whether to fetch only the closest hit for each layer or entity type.

Detailed Description

Responsible for defining parameters of the ray casting operations in 3D map canvases.

Since
QGIS 4.0

Definition at line 28 of file qgsraycastcontext.h.

Constructor & Destructor Documentation

◆ QgsRayCastContext()

QgsRayCastContext::QgsRayCastContext ( )
default

Member Function Documentation

◆ angleThreshold()

float QgsRayCastContext::angleThreshold ( ) const

Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.

Definition at line 45 of file qgsraycastcontext.cpp.

◆ maximumDistance()

float QgsRayCastContext::maximumDistance ( ) const

The maximum distance from ray origin to look for hits when casting a ray.

Default value is -1, meaning that the far plane will be used as a maximum distance.

Definition at line 30 of file qgsraycastcontext.cpp.

◆ setAngleThreshold()

void QgsRayCastContext::setAngleThreshold ( float angle)

Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.

Note
Currently only supported for point cloud layers.

Definition at line 40 of file qgsraycastcontext.cpp.

◆ setMaximumDistance()

void QgsRayCastContext::setMaximumDistance ( float distance)

Sets the maximum distance from ray origin to look for hits when casting a ray.

Setting to -1 will set the maximum distance to the camera's far plane.

Definition at line 35 of file qgsraycastcontext.cpp.

◆ setSingleResult()

void QgsRayCastContext::setSingleResult ( bool enable)

Sets whether to fetch only the closest hit for each layer or entity type.

Setting this to false will return all ray hits.

Note
Currently only point cloud layers support false.

Definition at line 20 of file qgsraycastcontext.cpp.

◆ singleResult()

bool QgsRayCastContext::singleResult ( ) const

Returns whether to fetch only the closest hit for each layer or entity type.

If not set it defaults to true.

Definition at line 25 of file qgsraycastcontext.cpp.


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