Class: QgsRayCastContext¶
Responsible for defining parameters of the ray casting operations in 3D map canvases.
Added in version 4.0.
Methods
Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone. |
|
The maximum distance from ray origin to look for hits when casting a ray. |
|
Sets an angle threshold in degrees for ray intersections, effectively turning a ray into a cone. |
|
Sets the maximum distance from ray origin to look for hits when casting a ray. |
|
Sets whether to fetch only the closest hit for each layer or entity type. |
|
Returns whether to fetch only the closest hit for each layer or entity type. |
- class qgis._3d.QgsRayCastContext[source]¶
Bases:
object- angleThreshold(self) float[source]¶
Sets an
anglethreshold in degrees for ray intersections, effectively turning a ray into a cone.- Return type:
float
- maximumDistance(self) float[source]¶
The maximum distance from ray origin to look for hits when casting a ray. Default value is -1, meaning that the far plane will be used as a maximum distance.
- Return type:
float
- setAngleThreshold(self, angle: float)[source]¶
Sets an
anglethreshold in degrees for ray intersections, effectively turning a ray into a cone.Note
Currently only supported for point cloud layers.
- Parameters:
angle (float)
- setMaximumDistance(self, distance: float)[source]¶
Sets the maximum
distancefrom ray origin to look for hits when casting a ray. Setting to -1 will set the maximum distance to the camera’s far plane.- Parameters:
distance (float)