SoOneShot Class Reference
[Engines]

Timer that runs for a pre-set amount of time. More...

#include <Inventor/engines/SoOneShot.h>

Inheritance diagram for SoOneShot:
SoEngine SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  Flags {
  RETRIGGERABLE = (1<<0),
  HOLD_FINAL = (1<<1)
}

Public Member Functions

virtual SoType getTypeId () const
 SoOneShot ()

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFTime duration
SoSFTrigger trigger
SoSFBitMask flags
SoSFBool disable
SoSFTime timeIn
SoEngineOutput timeOut
SoEngineOutput isActive
SoEngineOutput ramp

Detailed Description

Timer that runs for a pre-set amount of time.

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.

FILE FORMAT/DEFAULT

SEE ALSO

SoElapsedTime, SoEngineOutput


Member Enumeration Documentation

Flags.

Enumerator:
RETRIGGERABLE 

Can start over during the cycle.

HOLD_FINAL 

Output values stay high after cycle.


Constructor & Destructor Documentation

SoOneShot::SoOneShot (  ) 

Constructor.


Member Function Documentation

static SoType SoOneShot::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoEngine.

virtual SoType SoOneShot::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Implements SoTypedObject.


Member Data Documentation

If TRUE, the timer is disabled.

Duration of the active cycle.

Control flags.

( SoSFBool ) Is TRUE during the active cycle.

( SoSFFloat ) Ramps linearly from 0.0 to 1.0.

Running time.

( SoSFTime ) Elapsed time from the start.

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.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/