QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsraycasthit.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsraycasthit.h
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#ifndef QGSRAYCASTHIT_H
17#define QGSRAYCASTHIT_H
18
19#include "qgis_3d.h"
20#include "qgsfeatureid.h"
21#include "qgsvector3d.h"
22
23#include <QVector3D>
24
25class QgsMapLayer;
26
34class _3D_EXPORT QgsRayCastHit
35{
36 public:
37 QgsRayCastHit() = default;
38
40 double distance() const;
41
44
51 QVariantMap properties() const;
52
54 void setDistance( double distance );
55
57 void setMapCoordinates( const QgsVector3D &point );
58
60 void setProperties( const QVariantMap &attributes );
61
62 private:
63 double mDistance = -1.;
64 QgsVector3D mPos;
65 QVariantMap mAttributes;
66};
67
68#endif // QGSRAYCASTHIT_H
Base class for all map layer types.
Definition qgsmaplayer.h:80
void setProperties(const QVariantMap &attributes)
Sets the point cloud point attributes, empty map if hit was not on a point cloud point.
QgsRayCastHit()=default
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