QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsraycasthit.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsraycasthit.cpp
3 ---------------------
4 begin : September 2025
5 copyright : (C) 2025 by Stefanos Natsis
6 email : uclaros at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#include "qgsraycasthit.h"
17
19{
20 return mDistance;
21}
22
24{
25 return mPos;
26}
27
28QVariantMap QgsRayCastHit::properties() const
29{
30 return mAttributes;
31}
32
34{
35 mDistance = distance;
36}
37
39{
40 mPos = point;
41}
42
43void QgsRayCastHit::setProperties( const QVariantMap &attributes )
44{
45 mAttributes = attributes;
46}
void setProperties(const QVariantMap &attributes)
Sets the point cloud point attributes, empty map if hit was not on a point cloud point.
void setMapCoordinates(const QgsVector3D &point)
Sets the hit point position in 3d map coordinates.
void setDistance(double distance)
Sets the hit's distance from the ray's origin.
QVariantMap properties() const
Returns a map with the properties of the intersected entity.
double distance() const
Returns the hit's distance from the ray's origin.
QgsVector3D mapCoordinates() const
Returns the hit position in 3d map coordinates.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition qgsvector3d.h:30