Class SoOneShot
- All Implemented Interfaces:
- SafeDisposable
timeIn input is connected to the  realTime  global field. It can, however, by connected to any other time source.
 The timer is started when the trigger input is touched. It then runs for the specified duration, and updates the timeOut output with the time that has elapsed. During that time, the ramp output is also updated. The ramp output starts at 0.0 at the beginning of the cycle, and linearly increases until it reaches 1.0 at the end of the cycle.
 
You can disable the timer by setting the disable input to true. The output value remains 0.0 while the timer is disabled. If the timer is disabled in the middle of a cycle the output values will be set to 0.0.
 
The flags input contains control flags. Using the flags you can set the timer to be retriggerable in the middle of a cycle, and set the output values to stay high after the cycle has been completed. By default, these flags are not set.
 
File format/default:
OneShot {
| duration | 1 | 
| trigger | |
| flags | () | 
| disable | false | 
| timeIn | <current time> | 
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class com.openinventor.inventor.InventorInventor.ConstructorCommand
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal SoSFBoolIf true, the timer is disabled.final SoSFTimeDuration of the active cycle.final SoSFBitMask<SoOneShot.FlagsType> Control flags.final SoEngineOutput(SoSFBool) Is true during the active cycle.final SoEngineOutput(SoSFFloat) Ramps linearly from 0.0 to 1.0.final SoSFTimeRunning time.final SoEngineOutput(SoSFTime) Elapsed time from the start.final SoSFTriggerStart the cycle.Fields inherited from class com.openinventor.inventor.InventorVERBOSE_LEVEL, ZeroHandle
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class com.openinventor.inventor.engines.SoEnginecopy, getByName, getOutput, getOutputNameMethods inherited from class com.openinventor.inventor.fields.SoFieldContainercopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBasedispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touchMethods inherited from class com.openinventor.inventor.InventorgetNativeResourceHandle
- 
Field Details- 
durationDuration of the active cycle.
- 
triggerStart the cycle. The trigger will be ignored if it is touched in the middle of a cycle and the RETRIGGERABLE flag is not set.
- 
flagsControl flags.
- 
disableIf true, the timer is disabled.
- 
timeInRunning time.
- 
timeOut(SoSFTime) Elapsed time from the start.
- 
isActive(SoSFBool) Is true during the active cycle.
- 
ramp(SoSFFloat) Ramps linearly from 0.0 to 1.0.
 
- 
- 
Constructor Details- 
SoOneShotpublic SoOneShot()Constructor.
 
-