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
public class SoElapsedTime extends SoEngine
Basic controllable time source. This engine functions as a stopwatch; it outputs the time that has elapsed since it started running. By default, thetimeIn
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 thespeed
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 thetimeOut
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 theon
input field.File format/default:
ElapsedTime {
timeIn <current time> speed 1 on true pause false reset - See Also:
SoTimeCounter
,SoOneShot
,SoEngineOutput
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFBool
on
true to start running, false to stop.SoSFBool
pause
true to freeze, false to continue running.SoSFTrigger
reset
Reset the base time.SoSFFloat
speed
Scale factor for time.SoSFTime
timeIn
Running time.SoEngineOutput
timeOut
(SoSFTime
) Time elapsed, modified by the speed factor.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoElapsedTime()
Constructor.
-
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 Detail
-
timeIn
public final SoSFTime timeIn
Running time.
-
speed
public final SoSFFloat speed
Scale factor for time.
-
on
public final SoSFBool on
true to start running, false to stop.
-
pause
public final SoSFBool pause
true to freeze, false to continue running.
-
reset
public final SoSFTrigger reset
Reset the base time.
-
timeOut
public final SoEngineOutput timeOut
(SoSFTime
) Time elapsed, modified by the speed factor.
-
-