man SoOneShot () - timer that runs for a pre-set amount of time

NAME

SoOneShot - timer that runs for a pre-set amount of time

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoOneShot

SYNOPSIS

#include <Inventor/engines/SoOneShot.h> enum Flags { c } c } Can start over during the cycle

c } c } Output values stay high after cycle

} Inputs from class SoOneShot: c } c } timeIn

c } c } duration

c } c } trigger

c } c } flags

c } c } disable Outputs from class SoOneShot: c } c } timeOut

c } c } isActive

c } c } ramp Methods from class SoOneShot: c } c } SoOneShot() Methods from class SoEngine: c } c } getClassTypeId()

c } c } getOutputs(SoEngineOutputList &list) const

c } c } getOutput(const SbName &outputName) const

c } c } getOutputName(const SoEngineOutput *output, SbName &outputName) const

c } c } copy() const

c } c } getByName(const SbName &name)

c } c } getByName(const SbName &name, SoEngineList &list) Methods from class SoFieldContainer: c } c } setToDefaults()

c } c } hasDefaultValues() const

c } c } fieldsAreEqual(const SoFieldContainer *fc) const

c } c } copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)

c } c } set(const char *fieldDataString)

c } c } get(SbString &fieldDataString)

c } c } getFields(SoFieldList &resultList) const

c } c } getField(const SbName &fieldName) const

c } c } getFieldName(const SoField *field, SbName &fieldName) const

c } c } isNotifyEnabled() const

c } c } enableNotify(SbBool flag) Methods from class SoBase: c } c } ref()

c } c } unref() const

c } c } unrefNoDelete() const

c } c } touch()

c } c } getTypeId() const

c } c } isOfType(SoType type) const

c } c } setName(const SbName &name)

c } c } getName() const

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

c } c } timeIn

Running time. c } c } duration

Duration of the active cycle. c } c } 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. c } c } flags

Control flags. c } c } disable

If TRUE, the timer is disabled.

OUTPUTS

c } c } timeOut

Elapsed time from the start. c } c } isActive

Is TRUE during the active cycle. c } c } ramp

Ramps linearly from 0.0 to 1.0.

METHODS

c } c } SoOneShot()

Constructor

FILE FORMAT/DEFAULTS

OneShot {
duration	1
trigger	
flags	()
disable	FALSE
timeIn	<current time>
}

SEE ALSO

SoElapsedTime, SoEngineOutput