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

Contains the results of ray casting operations in a 3D map canvas. More...

#include <qgsraycastresult.h>

Public Member Functions

 QgsRayCastResult ()
 Ctor.
void addLayerHits (QgsMapLayer *layer, const QList< QgsRayCastHit > &hits)
 Adds all hits from layer to the result.
void addTerrainHits (const QList< QgsRayCastHit > &hits)
 Adds all terrain hits to the result.
QList< QgsRayCastHitallHits () const
 Returns all the hits from both layer and terrain intersections.
bool hasLayerHits () const
 Returns true is ray hit at least one entity from a layer.
bool hasTerrainHits () const
 Returns true is the ray intersected the terrain.
bool isEmpty () const
 Returns true is ray did not intersect any layer or terrain entity.
QList< QgsRayCastHitlayerHits (QgsMapLayer *layer) const
 Returns all hits from entities of the specific layer.
QList< QgsMapLayer * > layers () const
 Returns pointers to the map layers of entities that were intersected by the ray.
QList< QgsRayCastHitterrainHits () const
 Returns all terrain intersection hits.

Detailed Description

Contains the results of ray casting operations in a 3D map canvas.

Since
QGIS 4.0

Definition at line 36 of file qgsraycastresult.h.

Constructor & Destructor Documentation

◆ QgsRayCastResult()

QgsRayCastResult::QgsRayCastResult ( )

Ctor.

Definition at line 20 of file qgsraycastresult.cpp.

Member Function Documentation

◆ addLayerHits()

void QgsRayCastResult::addLayerHits ( QgsMapLayer * layer,
const QList< QgsRayCastHit > & hits )

Adds all hits from layer to the result.

Definition at line 78 of file qgsraycastresult.cpp.

◆ addTerrainHits()

void QgsRayCastResult::addTerrainHits ( const QList< QgsRayCastHit > & hits)

Adds all terrain hits to the result.

Definition at line 87 of file qgsraycastresult.cpp.

◆ allHits()

QList< QgsRayCastHit > QgsRayCastResult::allHits ( ) const

Returns all the hits from both layer and terrain intersections.

Definition at line 66 of file qgsraycastresult.cpp.

◆ hasLayerHits()

bool QgsRayCastResult::hasLayerHits ( ) const

Returns true is ray hit at least one entity from a layer.

Definition at line 29 of file qgsraycastresult.cpp.

◆ hasTerrainHits()

bool QgsRayCastResult::hasTerrainHits ( ) const

Returns true is the ray intersected the terrain.

Definition at line 56 of file qgsraycastresult.cpp.

◆ isEmpty()

bool QgsRayCastResult::isEmpty ( ) const

Returns true is ray did not intersect any layer or terrain entity.

Definition at line 24 of file qgsraycastresult.cpp.

◆ layerHits()

QList< QgsRayCastHit > QgsRayCastResult::layerHits ( QgsMapLayer * layer) const

Returns all hits from entities of the specific layer.

Definition at line 51 of file qgsraycastresult.cpp.

◆ layers()

QList< QgsMapLayer * > QgsRayCastResult::layers ( ) const

Returns pointers to the map layers of entities that were intersected by the ray.

Definition at line 34 of file qgsraycastresult.cpp.

◆ terrainHits()

QList< QgsRayCastHit > QgsRayCastResult::terrainHits ( ) const

Returns all terrain intersection hits.

Definition at line 61 of file qgsraycastresult.cpp.


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