Class: QgsMeshVectorTraceAnimationGenerator¶
- class qgis.core.QgsMeshVectorTraceAnimationGenerator¶
Bases:
sip.wrapper
A wrapper for
QgsMeshParticuleTracesField
used to render the particles. Available for Python bindingNew in version 3.12.
QgsMeshVectorTraceAnimationGenerator(layer:
QgsMeshLayer
, rendererContext:QgsRenderContext
) Constructor to use with Python bindingQgsMeshVectorTraceAnimationGenerator(other:
QgsMeshVectorTraceAnimationGenerator
) Copy constructorMethods
Moves all the particles using frame per second (fps) to calculate the displacement and return the rendered frame
seeds particles in the vector fields
Sets the number of frames per seconds that will be rendered
Sets the max number of pixels that can be go through by the particles in 1 second
Sets the minimum tail length
Sets colors of particle
Sets maximum life time of particles in seconds
Sets particle size in px
Sets the tail factor, used to adjust the length of the tail.
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: 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) –