Class: QgsPointCloudRenderContext¶
Encapsulates the render context for a 2D point cloud rendering operation.
Added in version 3.18.
- class qgis.core.QgsPointCloudRenderContext[source]¶
Bases:
object- __init__(context: QgsRenderContext, scale: QgsVector3D, offset: QgsVector3D, zValueScale: float, zValueFixedOffset: float, feedback: QgsFeedback | None = None)
Constructor for QgsPointCloudRenderContext.
The
scaleandoffsetarguments specify the scale and offset of the layer’s int32 coordinates compared to CRS coordinates respectively.The
zValueScaleargument specifies any constant scaling factor which must be applied to z values taken from the point cloud index.The
zValueFixedOffsetargument specifies any constant offset value which must be added to z values taken from the point cloud index.- Parameters:
context (QgsRenderContext)
scale (QgsVector3D)
offset (QgsVector3D)
zValueScale (float)
zValueFixedOffset (float)
feedback (Optional[QgsFeedback] = None)
- attributes(self) QgsPointCloudAttributeCollection[source]¶
Returns the attributes associated with the rendered block.
See also
- Return type:
- feedback(self) QgsFeedback | None[source]¶
Returns the feedback object used to cancel rendering
Added in version 3.20.
- Return type:
Optional[QgsFeedback]
- incrementPointsRendered(self, count: int)[source]¶
Increments the count of points rendered by the specified amount.
It is a point cloud renderer’s responsibility to correctly call this after rendering a block of points.
- Parameters:
count (int)
- offset(self) QgsVector3D[source]¶
Returns the offset of the layer’s int32 coordinates compared to CRS coords.
- Return type:
- renderContext(self) QgsRenderContext¶
Returns a reference to the context’s render context.
- Return type:
- scale(self) QgsVector3D[source]¶
Returns the scale of the layer’s int32 coordinates compared to CRS coords.
- Return type:
- setAttributes(self, attributes: QgsPointCloudAttributeCollection)[source]¶
Sets the
attributesassociated with the rendered block.See also
- Parameters:
attributes (QgsPointCloudAttributeCollection)
- setOffset(self, offset: QgsVector3D)[source]¶
Sets the offset of the layer’s int32 coordinates compared to CRS coords.
Added in version 3.20.
- Parameters:
offset (QgsVector3D)
- setScale(self, scale: QgsVector3D)[source]¶
Sets the scale of the layer’s int32 coordinates compared to CRS coords.
Added in version 3.20.
- Parameters:
scale (QgsVector3D)
- xOffset(self) int[source]¶
Returns the offset for the x value in a point record.
See also
See also
- Return type:
int
- yOffset(self) int[source]¶
Returns the offset for the y value in a point record.
See also
See also
- Return type:
int
- zOffset(self) int[source]¶
Returns the offset for the y value in a point record.
See also
See also
- Return type:
int
- zValueFixedOffset(self) float[source]¶
Returns any constant offset which must be applied to z values taken from the point cloud index.
Note
Scaling of z values via
zValueScale()should be applied before thezValueFixedOffset().- Return type:
float
- zValueScale(self) float[source]¶
Returns any constant scaling factor which must be applied to z values taken from the point cloud index.
Note
Scaling of z values should be applied before the
zValueFixedOffset().- Return type:
float