| 1 |
NAME SoElapsedTime SoElapsedTime "" { basic controllable time source } |
| 2 |
|
| 3 |
DESC { |
| 4 |
This engine functions as a stopwatch; it outputs the time that has |
| 5 |
elapsed since it started running. |
| 6 |
By default, the \vtimeIn\. input is connected to the \vrealTime\. global field. |
| 7 |
It can, however, be connected to any other time source. |
| 8 |
\p |
| 9 |
The ouput from the engine is the time that has elapsed since it |
| 10 |
started running, or since the \vreset\. input was last triggered. |
| 11 |
You can affect the speed of the output time by setting the |
| 12 |
\vspeed\. scale factor. A value greater than 1.0 will speed up |
| 13 |
the output, and a value less than 1.0 will slow it down. |
| 14 |
\p |
| 15 |
If you pause the engine, by setting the \vpause\. input to TRUE, it stops |
| 16 |
updating the \vtimeOut\. output. When you turn off the pause, it jumps |
| 17 |
to its current position without losing time. |
| 18 |
Alternatively, if you want to stop the engine for a while, and then restart it |
| 19 |
from where it left off, use the \von\. input field. |
| 20 |
} |
| 21 |
|
| 22 |
INCLUDE engines/SoElapsedTime.h |
| 23 |
|
| 24 |
INPUT timeIn { Running time. } |
| 25 |
INPUT speed { Scale factor for time. } |
| 26 |
INPUT on { TRUE to start running, FALSE to stop. } |
| 27 |
INPUT pause { TRUE to freeze, FALSE to continue running. } |
| 28 |
INPUT reset { Reset the base time. } |
| 29 |
|
| 30 |
OUTPUT timeOut { Time elapsed, modified by the speed factor. } |
| 31 |
|
| 32 |
METHOD Create SoElapsedTime() { Constructor. } |
| 33 |
|
| 34 |
ALSO { SoTimeCounter, SoOneShot, SoEngineOutput } |