|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
Contains details about the ray intersecting entities when ray casting in a 3D map canvas. More...
#include <qgsraycasthit.h>
Public Member Functions | |
| QgsRayCastHit ()=default | |
| double | distance () const |
| Returns the hit's distance from the ray's origin. | |
| QgsVector3D | mapCoordinates () const |
| Returns the hit position in 3d map coordinates. | |
| QVariantMap | properties () const |
| Returns a map with the properties of the intersected entity. | |
| void | setDistance (double distance) |
| Sets the hit's distance from the ray's origin. | |
| void | setMapCoordinates (const QgsVector3D &point) |
| Sets the hit point position in 3d map coordinates. | |
| void | setProperties (const QVariantMap &attributes) |
| Sets the point cloud point attributes, empty map if hit was not on a point cloud point. | |
Contains details about the ray intersecting entities when ray casting in a 3D map canvas.
Definition at line 34 of file qgsraycasthit.h.
|
default |
| double QgsRayCastHit::distance | ( | ) | const |
Returns the hit's distance from the ray's origin.
Definition at line 18 of file qgsraycasthit.cpp.
| QgsVector3D QgsRayCastHit::mapCoordinates | ( | ) | const |
Returns the hit position in 3d map coordinates.
Definition at line 23 of file qgsraycasthit.cpp.
| QVariantMap QgsRayCastHit::properties | ( | ) | const |
Returns a map with the properties of the intersected entity.
For vector layer hits, the FID value is stored in key "fid". For point cloud layer hits, it contains the point attributes keys/values. For tiled scene layer hits, it contains the intersecting node details.
Definition at line 28 of file qgsraycasthit.cpp.
| void QgsRayCastHit::setDistance | ( | double | distance | ) |
Sets the hit's distance from the ray's origin.
Definition at line 33 of file qgsraycasthit.cpp.
| void QgsRayCastHit::setMapCoordinates | ( | const QgsVector3D & | point | ) |
Sets the hit point position in 3d map coordinates.
Definition at line 38 of file qgsraycasthit.cpp.
| void QgsRayCastHit::setProperties | ( | const QVariantMap & | attributes | ) |
Sets the point cloud point attributes, empty map if hit was not on a point cloud point.
Definition at line 43 of file qgsraycasthit.cpp.