Scroll to navigation

SoElapsedTime(3IV)() SoElapsedTime(3IV)()

NAME

SoElapsedTime — basic controllable time source

INHERITS FROM

SoBase > SoFieldContainer > SoEngine > SoElapsedTime

SYNOPSIS

#include <Inventor/engines/SoElapsedTime.h>


Inputs from class SoElapsedTime:


SoSFTime timeIn

SoSFFloat speed

SoSFBool on

SoSFBool pause

SoSFTrigger reset


Outputs from class SoElapsedTime:


(SoSFTime) timeOut


Methods from class SoElapsedTime:


SoElapsedTime()


Methods from class SoEngine:


static SoType getClassTypeId()

virtual int getOutputs(SoEngineOutputList &list) const

SoEngineOutput * getOutput(const SbName &outputName) const

SbBool getOutputName(const SoEngineOutput *output, SbName &outputName) const

SoEngine * copy() const

static SoEngine * getByName(const SbName &name)

static int getByName(const SbName &name, SoEngineList &list)


Methods from class SoFieldContainer:


void setToDefaults()

SbBool hasDefaultValues() const

SbBool fieldsAreEqual(const SoFieldContainer *fc) const

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

SbBool set(const char *fieldDataString)

void get(SbString &fieldDataString)

virtual int getFields(SoFieldList &resultList) const

virtual SoField * getField(const SbName &fieldName) const

SbBool getFieldName(const SoField *field, SbName &fieldName) const

SbBool isNotifyEnabled() const

SbBool enableNotify(SbBool flag)


Methods from class SoBase:


void ref()

void unref() const

void unrefNoDelete() const

void touch()

virtual SoType getTypeId() const

SbBool isOfType(SoType type) const

virtual void setName(const SbName &name)

virtual SbName getName() const

DESCRIPTION

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.

INPUTS


SoSFTime timeIn

Running time.



SoSFFloat speed

Scale factor for time.



SoSFBool on

TRUE to start running, FALSE to stop.



SoSFBool pause

TRUE to freeze, FALSE to continue running.



SoSFTrigger reset

Reset the base time.


OUTPUTS


(SoSFTime) timeOut

Time elapsed, modified by the speed factor.


METHODS


SoElapsedTime()

Constructor.


FILE FORMAT/DEFAULTS

ElapsedTime {

timeIn <current time> speed 1 on TRUE pause FALSE reset
}

SEE ALSO

SoTimeCounter, SoOneShot, SoEngineOutput