Class: QgsMeshVectorTraceAnimationGenerator

A wrapper for QgsMeshParticuleTracesField used to render the particles.

Available for Python binding

Added in version 3.12.

class qgis.core.QgsMeshVectorTraceAnimationGenerator[source]

Bases: object

__init__(layer: QgsMeshLayer | None, rendererContext: QgsRenderContext)

Constructor to use with Python binding

Parameters:
__init__(other: QgsMeshVectorTraceAnimationGenerator)
Parameters:

other (QgsMeshVectorTraceAnimationGenerator)

imageRendered(self) QImage[source]

Moves all the particles using frame per second (fps) to calculate the displacement and return the rendered frame

Return type:

QImage

seedRandomParticles(self, count: int)[source]

seeds particles in the vector fields

Parameters:

count (int)

setFPS(self, FPS: int)[source]

Sets the number of frames per seconds that will be rendered

Parameters:

FPS (int)

setMaxSpeedPixel(self, max: int)[source]

Sets the max number of pixels that can be go through by the particles in 1 second

Parameters:

max (int)

setMinimumTailLength(self, l: int)[source]

Sets the minimum tail length

Parameters:

l (int)

setParticlesColor(self, c: QColor | Qt.GlobalColor)[source]

Sets colors of particle

Parameters:

c (Union[QColor, Qt.GlobalColor])

setParticlesLifeTime(self, particleLifeTime: float)[source]

Sets maximum life time of particles in seconds

Parameters:

particleLifeTime (float)

setParticlesSize(self, width: float)[source]

Sets particle size in px

Parameters:

width (float)

setTailFactor(self, fct: float)[source]

Sets the tail factor, used to adjust the length of the tail. 0 : minimum length, >1 increase the tail

Parameters:

fct (float)

setTailPersitence(self, p: float)[source]

Sets the visual persistence of the tail

Parameters:

p (float)