Class: QgsMeshVectorTraceAnimationGenerator

class qgis.core.QgsMeshVectorTraceAnimationGenerator(layer: QgsMeshLayer, rendererContext: QgsRenderContext)

Bases: sip.wrapper

Constructor to use with Python binding

QgsMeshVectorTraceAnimationGenerator(other: QgsMeshVectorTraceAnimationGenerator) Copy constructor

A wrapper for QgsMeshParticuleTracesField used to render the particles. Available for Python binding

New in version 3.12.

Parameters
imageRendered(self) → QImage

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)

seeds particles in the vector fields

Parameters

count (int) –

setFPS(self, FPS: int)

Sets the number of frames per seconds that will be rendered

Parameters

FPS (int) –

setMaxSpeedPixel(self, max: int)

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

Parameters

max (int) –

setMinimumTailLength(self, l: int)

Sets the minimum tail length

Parameters

l (int) –

setParticlesColor(self, c: Union[QColor, Qt.GlobalColor, QGradient])

Sets colors of particle

Parameters

c (Union[QColor) –

setParticlesLifeTime(self, particleLifeTime: float)

Sets maximum life time of particles in seconds

Parameters

particleLifeTime (float) –

setParticlesSize(self, width: float)

Sets particle size in px

Parameters

width (float) –

setTailFactor(self, fct: float)

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)

Sets the visual persistence of the tail

Parameters

p (float) –