Class: QgsMeshVectorTraceAnimationGenerator¶
A wrapper for QgsMeshParticuleTracesField
used to render the
particles.
Available for Python binding
Added in version 3.12.
Methods
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 |
- class qgis.core.QgsMeshVectorTraceAnimationGenerator[source]¶
Bases:
object
- __init__(layer: QgsMeshLayer | None, rendererContext: QgsRenderContext)
Constructor to use with Python binding
- Parameters:
layer (Optional[QgsMeshLayer])
rendererContext (QgsRenderContext)
- __init__(other: QgsMeshVectorTraceAnimationGenerator)
- Parameters:
- 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)
- 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)