Class: QgsMeshVectorTraceAnimationGenerator

class qgis.core.QgsMeshVectorTraceAnimationGenerator

Bases: sip.wrapper

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

New in version 3.12.

QgsMeshVectorTraceAnimationGenerator(layer: QgsMeshLayer, rendererContext: QgsRenderContext) Constructor to use with Python binding

QgsMeshVectorTraceAnimationGenerator(other: QgsMeshVectorTraceAnimationGenerator) Copy constructor

Methods

imageRendered

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

seedRandomParticles

seeds particles in the vector fields

setFPS

Sets the number of frames per seconds that will be rendered

setMaxSpeedPixel

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

setMinimumTailLength

Sets the minimum tail length

setParticlesColor

Sets colors of particle

setParticlesLifeTime

Sets maximum life time of particles in seconds

setParticlesSize

Sets particle size in px

setTailFactor

Sets the tail factor, used to adjust the length of the tail.

setTailPersitence

Sets the visual persistence of the tail

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) –