Class SoElapsedTime
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoBase
com.openinventor.inventor.fields.SoFieldContainer
com.openinventor.inventor.engines.SoEngine
com.openinventor.inventor.engines.SoElapsedTime
- All Implemented Interfaces:
SafeDisposable
Basic controllable time source.
This engine functions as a stopwatch; it outputs the time that has elapsed since it started running. By default, the
timeIn
input is connected to the realTime global field. It can, however, be connected to any other time source.
The ouput from the engine is the time that has elapsed since it started running, or since the reset
input was last triggered. You can affect the speed of the output time by setting the speed
scale factor. A value greater than 1.0 will speed up the output, and a value less than 1.0 will slow it down.
If you pause the engine, by setting the pause
input to true, it stops updating the timeOut
output. When you turn off the pause, it jumps to its current position without losing time. Alternatively, if you want to stop the engine for a while, and then restart it from where it left off, use the on
input field.
File format/default:
ElapsedTime {
timeIn | <current time> |
speed | 1 |
on | true |
pause | false |
reset |
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFBool
true to start running, false to stop.final SoSFBool
true to freeze, false to continue running.final SoSFTrigger
Reset the base time.final SoSFFloat
Scale factor for time.final SoSFTime
Running time.final SoEngineOutput
(SoSFTime
) Time elapsed, modified by the speed factor.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.openinventor.inventor.engines.SoEngine
copy, getByName, getOutput, getOutputName
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
timeIn
Running time. -
speed
Scale factor for time. -
on
true to start running, false to stop. -
pause
true to freeze, false to continue running. -
reset
Reset the base time. -
timeOut
(SoSFTime
) Time elapsed, modified by the speed factor.
-
-
Constructor Details
-
SoElapsedTime
public SoElapsedTime()Constructor.
-