Package com.openinventor.meshviz.data
Class PoStreamParticleMotion
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoBase
com.openinventor.inventor.fields.SoFieldContainer
com.openinventor.inventor.nodes.SoNode
com.openinventor.inventor.nodekits.SoBaseKit
com.openinventor.meshviz.graph.PoBase
com.openinventor.meshviz.data.Po3DdataMaster
com.openinventor.meshviz.data.PoMesh
com.openinventor.meshviz.data.PoBaseStreamLine
com.openinventor.meshviz.data.PoStreamParticleMotion
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
PoStreamLineMotion,PoStreamPointMotion,PoStreamSphereMotion,PoStreamTadpoleMotion
Animation of particles along streamlines on a mesh.
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:
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.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
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.
File format/default:
| 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 |
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.meshviz.data.PoBaseStreamLine
PoBaseStreamLine.IntegrationDirectionsNested classes/interfaces inherited from class com.openinventor.meshviz.data.PoMesh
PoMesh.ColoringTypesNested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoBase
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypesNested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFFloatNumber of animation's cycles per second.final SoSFBoolStop the animation if isBlinking is false.final SoSFBoolSet it to true prevents each first position of the different streamlines to start simultaneously.final SoSFInt32Number of frames to be visualized during an animation cycle.final SoSFFloatDuration from which the first position on the streamline is calculated.final SoSFFloatTime step between 2 consecutive points of a streamline.final SoSFInt32Visualized frame index (used only if isBlinking is false).Fields inherited from class com.openinventor.meshviz.data.PoBaseStreamLine
colors, integrationDirection, integrationMaxStepNumber, integrationStepLengthFactor, maxLength, maxLifetime, minSpeed, startPointsFields inherited from class com.openinventor.meshviz.data.PoMesh
coloringType, creaseAngle, moduleDataMapping, smoothTextureContouring, valuesIndex, valuesIndexForCellFilter, vecsIndexFields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoringFields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Method Summary
Modifier and TypeMethodDescriptionstatic SoNodekitCatalogReturns theSoNodekitCatalogfor this class.Methods inherited from class com.openinventor.meshviz.data.PoMesh
getDataMapping, getIsovaluesList, getMesh, getModuleDataMapping, setDataMapping, setIsovaluesList, setMesh, setModuleDataMappingMethods inherited from class com.openinventor.meshviz.graph.PoBase
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKitMethods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildrenMethods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
pulseFrequency
Number of frames to be visualized during an animation cycle. 5 by default. -
shiftStart
Duration from which the first position on the streamline is calculated. 0 by default. -
timeStep
Time step between 2 consecutive points of a streamline. 1 by default. -
isStartRandomized
Set it to true prevents each first position of the different streamlines to start simultaneously. true by default. -
isBlinking
Stop the animation if isBlinking is false. true by default. -
viewFrame
Visualized frame index (used only if isBlinking is false). 0 by default. -
blinkSpeed
Number of animation's cycles per second. 3.0 by default.
-
-
Method Details
-
getClassNodekitCatalog
Returns theSoNodekitCatalogfor this class.
-