Class: QgsRayCastHit¶
Contains details about the ray intersecting entities when ray casting in a 3D map canvas.
Added in version 4.0.
- class qgis._3d.QgsRayCastHit[source]¶
Bases:
object- mapCoordinates(self) QgsVector3D[source]¶
Returns the hit position in 3d map coordinates
- Return type:
- properties(self) Dict[str, Any][source]¶
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.
- Return type:
Dict[str, Any]
- setDistance(self, distance: float)[source]¶
Sets the hit’s
distancefrom the ray’s origin- Parameters:
distance (float)
- setMapCoordinates(self, point: QgsVector3D)[source]¶
Sets the hit
pointposition in 3d map coordinates- Parameters:
point (QgsVector3D)