Class: QgsPointCloudRenderContext

class qgis.core.QgsPointCloudRenderContext

Bases: sip.wrapper

Encapsulates the render context for a 2D point cloud rendering operation.

New in version 3.18.

QgsPointCloudRenderContext(context: QgsRenderContext, scale: QgsVector3D, offset: QgsVector3D, zValueScale: float, zValueFixedOffset: float, feedback: QgsFeedback = None) Constructor for QgsPointCloudRenderContext.

The scale and offset arguments specify the scale and offset of the layer’s int32 coordinates compared to CRS coordinates respectively.

The zValueScale argument specifies any constant scaling factor which must be applied to z values taken from the point cloud index.

The zValueFixedOffset argument specifies any constant offset value which must be added to z values taken from the point cloud index.

Methods

attributes

Returns the attributes associated with the rendered block.

feedback

Returns the feedback object used to cancel rendering

incrementPointsRendered

Increments the count of points rendered by the specified amount.

offset

Returns the offset of the layer’s int32 coordinates compared to CRS coords.

pointRecordSize

Returns the size of a single point record.

pointsRendered

Returns the total number of points rendered.

renderContext

Returns a reference to the context’s render context.

scale

Returns the scale of the layer’s int32 coordinates compared to CRS coords.

setAttributes

Sets the attributes associated with the rendered block.

setOffset

Sets the offset of the layer’s int32 coordinates compared to CRS coords.

setScale

Sets the scale of the layer’s int32 coordinates compared to CRS coords.

xOffset

Returns the offset for the x value in a point record.

yOffset

Returns the offset for the y value in a point record.

zOffset

Returns the offset for the y value in a point record.

zValueFixedOffset

Returns any constant offset which must be applied to z values taken from the point cloud index.

zValueScale

Returns any constant scaling factor which must be applied to z values taken from the point cloud index.

attributes(self)QgsPointCloudAttributeCollection

Returns the attributes associated with the rendered block.

See also

setAttributes()

Return type

QgsPointCloudAttributeCollection

feedback(self)QgsFeedback

Returns the feedback object used to cancel rendering

New in version 3.20.

Return type

QgsFeedback

incrementPointsRendered(self, count: int)

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

Returns the offset of the layer’s int32 coordinates compared to CRS coords.

Return type

QgsVector3D

pointRecordSize(self)int

Returns the size of a single point record.

Return type

int

pointsRendered(self)int

Returns the total number of points rendered.

Return type

int

renderContext(self)QgsRenderContext

Returns a reference to the context’s render context.

Return type

QgsRenderContext

scale(self)QgsVector3D

Returns the scale of the layer’s int32 coordinates compared to CRS coords.

Return type

QgsVector3D

setAttributes(self, attributes: QgsPointCloudAttributeCollection)

Sets the attributes associated with the rendered block.

See also

attributes()

Parameters

attributes (QgsPointCloudAttributeCollection) –

setOffset(self, offset: QgsVector3D)

Sets the offset of the layer’s int32 coordinates compared to CRS coords.

New in version 3.20.

Parameters

offset (QgsVector3D) –

setScale(self, scale: QgsVector3D)

Sets the scale of the layer’s int32 coordinates compared to CRS coords.

New in version 3.20.

Parameters

scale (QgsVector3D) –

xOffset(self)int

Returns the offset for the x value in a point record.

See also

yOffset()

See also

zOffset()

Return type

int

yOffset(self)int

Returns the offset for the y value in a point record.

See also

xOffset()

See also

zOffset()

Return type

int

zOffset(self)int

Returns the offset for the y value in a point record.

See also

xOffset()

See also

yOffset()

Return type

int

zValueFixedOffset(self)float

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 the zValueFixedOffset().

Return type

float

zValueScale(self)float

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