QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsraycastcontext.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsraycastcontext.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 QGSRAYCASTCONTEXT_H
17#define QGSRAYCASTCONTEXT_H
18
19#include "qgis_3d.h"
20
28class _3D_EXPORT QgsRayCastContext
29{
30 public:
31 QgsRayCastContext() = default;
32
38 void setSingleResult( bool enable );
39
44 bool singleResult() const;
45
50 void setMaximumDistance( float distance );
51
56 float maximumDistance() const;
57
62 void setAngleThreshold( float angle );
63
67 float angleThreshold() const;
68
69 private:
70 bool mSingleResult = true;
71 float mMaxDistance = -1.0f;
72 float mAngleThreshold = -0.0f;
73};
74
75#endif // QGSRAYCASTCONTEXT_H
float angleThreshold() const
Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.
float maximumDistance() const
The maximum distance from ray origin to look for hits when casting a ray.
bool singleResult() const
Returns whether to fetch only the closest hit for each layer or entity type.
QgsRayCastContext()=default
void setSingleResult(bool enable)
Sets whether to fetch only the closest hit for each layer or entity type.
void setMaximumDistance(float distance)
Sets the maximum distance from ray origin to look for hits when casting a ray.
void setAngleThreshold(float angle)
Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone.