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 SoSFBooltrue to start running, false to stop.final SoSFBooltrue to freeze, false to continue running.final SoSFTriggerReset the base time.final SoSFFloatScale factor for time.final SoSFTimeRunning 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, getOutputNameMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touchMethods 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.
-