SoOneShot(3IV)NAMESoOneShot (SoOneShot) - timer that runs for a pre-set amount of time
INHERITS FROM
SoBase > SoFieldContainer > SoEngine > SoOneShotSYNOPSIS
#include <Inventor_c/engines/SoOneShot.h>
enum SoOneShotFlags {
SO_ONE_SHOT_RETRIGGERABLE Can start over during the cycle
SO_ONE_SHOT_HOLD_FINAL Output values stay high after cycle
}
Inputs from class SoOneShot:
SoSFTime timeIn
SoSFTime duration
SoSFTrigger trigger
SoSFBitMask flags
SoSFBool disable
Outputs from class SoOneShot:
(SoSFTime) timeOut
(SoSFBool) isActive
(SoSFFloat) ramp
Functions from class SoOneShot:
SoOneShot * SoOneShotCreate()
Functions from class SoEngine:
SoType SoOneShotGetTypeId()
int SoOneShotGetOuts(const SoOneShot *this,
SoEngineOutputList *list)
SoEngineOutput * SoOneShotGetOut(const SoOneShot *this, const char
*outputName)
SbBool SoOneShotGetOutName(const SoOneShot *this, const
SoEngineOutput *output, SbName *outputName)
SoEngine * SoOneShotCopy(const SoOneShot *this)
SoEngine * SoOneShotGetByName(const char *name)
int SoOneShotGetByNameList(const char *name, SoEngineList
*list)
Functions from class SoFieldContainer:
SoType SoOneShotGetClassTypeId()
void SoOneShotSetToDflts(SoOneShot *this)
SbBool SoOneShotHasDfltVals(const SoOneShot *this)
Page 1SoOneShot(3IV)
SbBool SoOneShotFldsAreEq(const SoOneShot *this, const
SoFieldContainer *fc)
void SoOneShotCopyFieldVals(SoOneShot *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
SbBool SoOneShotSet(SoOneShot *this, const char
*fieldDataString)
void SoOneShotGet(SoOneShot *this, SbString
*fieldDataString)
int SoOneShotGetFields(const SoOneShot *this, SoFieldList
*resultList)
SoField * SoOneShotGetField(const SoOneShot *this, const char
*fieldName)
SbBool SoOneShotGetFieldName(const SoOneShot *this, const
SoField *field, SbName *fieldName)
SbBool SoOneShotIsNotifyEnabled(const SoOneShot *this)
SbBool SoOneShotEnableNotify(SoOneShot *this, SbBool flag)
Functions from class SoBase:
void SoOneShotRef(SoOneShot *this)
void SoOneShotUnref(const SoOneShot *this)
void SoOneShotUnrefNoDelete(const SoOneShot *this)
void SoOneShotTouch(SoOneShot *this)
SbBool SoOneShotIsOfType(const SoOneShot *this, SoType type)
void SoOneShotSetName(SoOneShot *this, const char *name)
SbName SoOneShotGetName(const SoOneShot *this)
DESCRIPTION
This engine is a timer that runs for a pre-set amount of time and then
stops. By default, the 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.
INPUTS
SoSFTime timeIn
Running time.
Page 2SoOneShot(3IV)
SoSFTime duration
Duration of the active cycle.
SoSFTrigger trigger
Start the cycle. The trigger will be ignored if it is touched in the
middle of a cycle and the RETRIGGERABLE flag is not set.
SoSFBitMask flags
Control flags.
SoSFBool disable
If TRUE, the timer is disabled.
OUTPUTS
(SoSFTime) timeOut
Elapsed time from the start.
(SoSFBool) isActive
Is TRUE during the active cycle.
(SoSFFloat) ramp
Ramps linearly from 0.0 to 1.0.
FUNCTIONSSoOneShot * SoOneShotCreate()
Constructor
FILE FORMAT/DEFAULTS
OneShot {
duration 1
trigger
flags ()
disable FALSE
timeIn <current time>
}
SEE ALSO
SoElapsedTime, SoEngineOutput
Page 3