Subgroup: other

Class: QgsTessellator

class qgis.core.QgsTessellator(originX: float, originY: float, addNormals: bool, invertNormals: bool = False, addBackFaces: bool = False)

Bases: sip.wrapper

Creates tessellator with a specified origin point of the world (in map coordinates)

QgsTessellator(QgsTessellator)

Class that takes care of tessellation of polygons into triangles.

It is expected that client code will create the tessellator object, then repeatedly call addPolygon() method that will generate triangles, and finally call data() to get final vertex data.

Optionally provides extrusion by adding triangles that serve as walls when extrusion height is non-zero.

New in version 3.4: Methods

addPolygon Tessellates a triangle and adds its vertex entries to the output data array
data Returns array of triangle vertex data
dataVerticesCount Returns the number of vertices stored in the output data array
stride Returns size of one vertex entry in bytes

Signals

Attributes

addPolygon(self, polygon: QgsPolygon, extrusionHeight: float)

Tessellates a triangle and adds its vertex entries to the output data array

data(self) → List[float]

Returns array of triangle vertex data

Vertice coordinates are stored as (x, z, -y)

dataVerticesCount(self) → int

Returns the number of vertices stored in the output data array

stride(self) → int

Returns size of one vertex entry in bytes