Animation of particles along streamlines on a mesh. More...
#include <MeshViz/3Ddata/PoStreamParticleMotion.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFInt32 | pulseFrequency |
SoSFFloat | shiftStart |
SoSFFloat | timeStep |
SoSFBool | isStartRandomized |
SoSFBool | isBlinking |
SoSFInt32 | viewFrame |
SoSFFloat | blinkSpeed |
This class realizes animation of particle along the list of streamlines starting from startPoints. First, it calculates the geometry of these streamlines according to the fields of the inherited class. Then it calculates a list of positions along the streamlines. Two consecutive positions on streamlines must be separated by a constant timeStep, in order to have an animation which respect the velocity. After that, blinking several frames does the animation. Each frame represents a selection of the calculated positions. This selection and the number of frame are defined by the value of pulseFrequency. For example, if pulseFrequency = 5, one position over 5 is kept in a frame. 5 frames are built, and the animation process will blink by cycling switch-on/switch-off one of these 5 frames. For a streamline made of 20 calculated positions, the 5 frames have the following position's indices:
Frame 0: 0,5,10,15 Frame 1: 1,6,11,16 Frame 2: 2,7,12,17 Frame 3: 3,8,13,18 Frame 4: 4,9,14,19
The first position of each streamline can be shifted in time, after duration of shiftStart from the source point. If isStartRandomized is FALSE, the first position's index of frame 0, is always 0. Otherwise, it has a random value between 0 and pulseFrequency-1. Setting isStartRandomized to TRUE is interesting only when several startPoint are defined, because it prevents each first position of the different streamlines to start simultaneously.
Blinking from a frame to the next frame can be speeded up or speeded down by the blinkSpeed field. It defines the number of cycles per second. Setting isBlinking to FALSE can stop the animation. In that case, the index of the visualized frame is viewFrame % pulseFrequency.
pulseFrequency | 5 |
shiftStart | 0.0 |
timeStep | 1.0 |
isStartRandomized | TRUE |
isBlinking | TRUE |
viewFrame | 0 |
blinkSpeed | 3.0 |
startPoints | SbVec3f(0,0,0) |
maxLifetime | 0 (i.e. infinite) |
maxLength | 0 (i.e. infinite) |
minSpeed | 0 (i.e. infinite) |
integrationStepLengthFactor | 0.3 |
integrationMaxStepNumber | 0 (i.e. infinite) |
integrationDirection | FORWARD |
colors | (SbColor(1,0,0) |
coloringType | COLOR_INHERITED |
valuesIndex | -1 |
valuesIndexForCellFilter | -1 |
vecsIndex | -1 |
moduleDataMapping | NULL |
static const SoNodekitCatalog* PoStreamParticleMotion::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoBaseStreamLine.
Reimplemented in PoStreamLineMotion, PoStreamPointMotion, PoStreamSphereMotion, and PoStreamTadpoleMotion.
static SoType PoStreamParticleMotion::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoBaseStreamLine.
Reimplemented in PoStreamLineMotion, PoStreamPointMotion, PoStreamSphereMotion, and PoStreamTadpoleMotion.
virtual const SoNodekitCatalog* PoStreamParticleMotion::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoBaseStreamLine.
Reimplemented in PoStreamLineMotion, PoStreamPointMotion, PoStreamSphereMotion, and PoStreamTadpoleMotion.
virtual SoType PoStreamParticleMotion::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoBaseStreamLine.
Reimplemented in PoStreamLineMotion, PoStreamPointMotion, PoStreamSphereMotion, and PoStreamTadpoleMotion.
Number of animation's cycles per second.
3.0 by default.
Stop the animation if isBlinking is FALSE.
TRUE by default.
Set it to TRUE prevents each first position of the different streamlines to start simultaneously.
TRUE by default.
Number of frames to be visualized during an animation cycle.
5 by default.
Duration from which the first position on the streamline is calculated.
0 by default.
Time step between 2 consecutive points of a streamline.
1 by default.
Visualized frame index (used only if isBlinking is FALSE).
0 by default.