Basic controllable time source. More...
#include <Inventor/engines/SoElapsedTime.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoElapsedTime () | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFTime | timeIn |
SoSFFloat | speed |
SoSFBool | on |
SoSFBool | pause |
SoSFTrigger | reset |
SoEngineOutput | timeOut |
Basic controllable time source.
This engine functions as a stopwatch; it outputs the time that has elapsed since it started running. By default, the timeIn 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 the speed 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 the timeOut 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 the on input field.
timeIn | <current time> |
speed | 1 |
on | TRUE |
pause | FALSE |
reset |
SoTimeCounter, SoOneShot, SoEngineOutput
SoElapsedTime::SoElapsedTime | ( | ) |
Constructor.
static SoType SoElapsedTime::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoEngine.
virtual SoType SoElapsedTime::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Implements SoTypedObject.
TRUE to start running, FALSE to stop.
TRUE to freeze, FALSE to continue running.
Reset the base time.
Scale factor for time.
Running time.
( SoSFTime ) Time elapsed, modified by the speed factor.