QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
qgsraycastcontext.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsraycastcontext.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 "
qgsraycastcontext.h
"
17
18
#include <algorithm>
19
20
void
QgsRayCastContext::setSingleResult
(
bool
enable )
21
{
22
mSingleResult = enable;
23
}
24
25
bool
QgsRayCastContext::singleResult
()
const
26
{
27
return
mSingleResult;
28
}
29
30
float
QgsRayCastContext::maximumDistance
()
const
31
{
32
return
mMaxDistance;
33
}
34
35
void
QgsRayCastContext::setMaximumDistance
(
float
distance )
36
{
37
mMaxDistance = distance;
38
}
39
40
void
QgsRayCastContext::setAngleThreshold
(
float
angle )
41
{
42
mAngleThreshold = std::clamp( angle, 0.f, 90.f );
43
}
44
45
float
QgsRayCastContext::angleThreshold
()
const
46
{
47
return
mAngleThreshold;
48
}
QgsRayCastContext::angleThreshold
float angleThreshold() const
Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.
Definition
qgsraycastcontext.cpp:45
QgsRayCastContext::maximumDistance
float maximumDistance() const
The maximum distance from ray origin to look for hits when casting a ray.
Definition
qgsraycastcontext.cpp:30
QgsRayCastContext::singleResult
bool singleResult() const
Returns whether to fetch only the closest hit for each layer or entity type.
Definition
qgsraycastcontext.cpp:25
QgsRayCastContext::setSingleResult
void setSingleResult(bool enable)
Sets whether to fetch only the closest hit for each layer or entity type.
Definition
qgsraycastcontext.cpp:20
QgsRayCastContext::setMaximumDistance
void setMaximumDistance(float distance)
Sets the maximum distance from ray origin to look for hits when casting a ray.
Definition
qgsraycastcontext.cpp:35
QgsRayCastContext::setAngleThreshold
void setAngleThreshold(float angle)
Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.
Definition
qgsraycastcontext.cpp:40
qgsraycastcontext.h
Generated on
for QGIS API Documentation by
1.17.0