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
public class PoStreamParticleMotion extends PoBaseStreamLine
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.IntegrationDirections
-
Nested classes/interfaces inherited from class com.openinventor.meshviz.data.PoMesh
PoMesh.ColoringTypes
-
Nested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoBase
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFFloat
blinkSpeed
Number of animation's cycles per second.SoSFBool
isBlinking
Stop the animation if isBlinking is false.SoSFBool
isStartRandomized
Set it to true prevents each first position of the different streamlines to start simultaneously.SoSFInt32
pulseFrequency
Number of frames to be visualized during an animation cycle.SoSFFloat
shiftStart
Duration from which the first position on the streamline is calculated.SoSFFloat
timeStep
Time step between 2 consecutive points of a streamline.SoSFInt32
viewFrame
Visualized frame index (used only if isBlinking is false).-
Fields inherited from class com.openinventor.meshviz.data.PoBaseStreamLine
colors, integrationDirection, integrationMaxStepNumber, integrationStepLengthFactor, maxLength, maxLifetime, minSpeed, startPoints
-
Fields inherited from class com.openinventor.meshviz.data.PoMesh
coloringType, creaseAngle, moduleDataMapping, smoothTextureContouring, valuesIndex, valuesIndexForCellFilter, vecsIndex
-
Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SoNodekitCatalog
getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.-
Methods inherited from class com.openinventor.meshviz.data.PoMesh
getDataMapping, getIsovaluesList, getMesh, getModuleDataMapping, setDataMapping, setIsovaluesList, setMesh, setModuleDataMapping
-
Methods inherited from class com.openinventor.meshviz.graph.PoBase
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKit
-
Methods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildren
-
Methods 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, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
pulseFrequency
public final SoSFInt32 pulseFrequency
Number of frames to be visualized during an animation cycle. 5 by default.
-
shiftStart
public final SoSFFloat shiftStart
Duration from which the first position on the streamline is calculated. 0 by default.
-
timeStep
public final SoSFFloat timeStep
Time step between 2 consecutive points of a streamline. 1 by default.
-
isStartRandomized
public final SoSFBool isStartRandomized
Set it to true prevents each first position of the different streamlines to start simultaneously. true by default.
-
isBlinking
public final SoSFBool isBlinking
Stop the animation if isBlinking is false. true by default.
-
viewFrame
public final SoSFInt32 viewFrame
Visualized frame index (used only if isBlinking is false). 0 by default.
-
blinkSpeed
public final SoSFFloat blinkSpeed
Number of animation's cycles per second. 3.0 by default.
-
-
Method Detail
-
getClassNodekitCatalog
public static SoNodekitCatalog getClassNodekitCatalog()
Returns theSoNodekitCatalog
for this class.
-
-