QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
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 "
qgsvector3d.h
"
21
22
#include <QVariantMap>
23
24
class
QgsMapLayer
;
25
33
class
_3D_EXPORT
QgsRayCastHit
34
{
35
public
:
36
QgsRayCastHit
() =
default
;
37
39
double
distance
()
const
;
40
42
QgsVector3D
mapCoordinates
()
const
;
43
50
QVariantMap
properties
()
const
;
51
53
void
setDistance
(
double
distance
);
54
56
void
setMapCoordinates
(
const
QgsVector3D
&point );
57
59
void
setProperties
(
const
QVariantMap &attributes );
60
61
private
:
62
double
mDistance = -1.;
63
QgsVector3D
mPos;
64
QVariantMap mAttributes;
65
};
66
67
#endif
// QGSRAYCASTHIT_H
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsRayCastHit::setProperties
void setProperties(const QVariantMap &attributes)
Sets the point cloud point attributes, empty map if hit was not on a point cloud point.
Definition
qgsraycasthit.cpp:43
QgsRayCastHit::QgsRayCastHit
QgsRayCastHit()=default
QgsRayCastHit::setMapCoordinates
void setMapCoordinates(const QgsVector3D &point)
Sets the hit point position in 3d map coordinates.
Definition
qgsraycasthit.cpp:38
QgsRayCastHit::setDistance
void setDistance(double distance)
Sets the hit's distance from the ray's origin.
Definition
qgsraycasthit.cpp:33
QgsRayCastHit::properties
QVariantMap properties() const
Returns a map with the properties of the intersected entity.
Definition
qgsraycasthit.cpp:28
QgsRayCastHit::distance
double distance() const
Returns the hit's distance from the ray's origin.
Definition
qgsraycasthit.cpp:18
QgsRayCastHit::mapCoordinates
QgsVector3D mapCoordinates() const
Returns the hit position in 3d map coordinates.
Definition
qgsraycasthit.cpp:23
QgsVector3D
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition
qgsvector3d.h:33
qgsvector3d.h
Generated on
for QGIS API Documentation by
1.17.0