class tsTime : public SoNode

Node storing time and speed for synchronized media feedback

Inheritance:


Public Methods

SoINTERNAL static void initClass()
Makes this class known to the OpenInventor type system.
tsTime()
Constructor
virtual ~tsTime()
Destructor

Public

Action behavior:
virtual void doAction(SoAction *action)
does default action behaviour. Sets time/speed in tsTimeElement.
virtual void GLRender(SoGLRenderAction *action)
does GLrender begaviour, calls doAction()
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
calls doAction()
virtual void callback(SoCallbackAction *action)
calls doAction()
virtual void pick(SoPickAction *action)
calls doAction()
New Fields
SoSFTime time
Field storing feedback time. Changing accordingly content of field 'speed' .
SoSFFloat speed
Field storing feedback speed. This field affects the automatic updating of field 'time'.

Protected Fields

SoSFTime* _gobalRealTime
global time field, NULL if not existing.

Protected

Changed Values
float _changedSpeed
stamp_t _changedUST
UST of last changing. Feedback should be addapted to meet this!
SbBool _timeChanged
Flag, to remember if "time" has changed.
SbBool _speedChanged
Flag, to remember if "speed" has changed.
Field-Sensors and CBs.
SoTimerSensor updateTimeFieldSensor
This sensor is scheduled frequently (TSTIME_UPDATE_FREQUENCY Hz), when 'speed' field != 0
static void updateTimeFieldCB(void *userData, SoSensor* sensor)
This CB is frequently called from the updateTimeFieldSensor of type SoTimerSensor to increment the 'time' field
SoFieldSensor _timeFldSensor
static void _timeFldChangedCB(void *userData, SoSensor* sensor)
Called immediately after field 'time' has been changed. Sets time stamp of this changing if content has really changed.
SoFieldSensor _speedFldSensor
static void _speedFldChangedCB(void *userData, SoSensor* sensor)
Called immediately after field 'speed' has been changed. Sets time stamp of this changing if content has really changed.
Last changes:
float _lastSpeed
stamp_t _lastUST
Time stamp when the clock was valid last time!
SbBool _lastValid

Private Methods

SO_NODE_HEADER(tsTime)

Documentation

Node storing time and speed for synchronized media feedback. A node of this class stores the properties time and speed for feedback of tsKit feedback nodes. It garants a consistent setting of these information, including a UST (Unified System Time) stamp of the time, when the time or speed has been changed.

When field 'speed' != 0.0 (not stopped) 'time' field is automatically updated according to the content of field 'speed'.

ACTION BEHAVIOR:

Sets 'time', 'speed', a time stamp and a reference to itself in the tsTimeElement.

SO_NODE_HEADER(tsTime)

New Fields

SoSFTime time
Field storing feedback time. Changing accordingly content of field 'speed' .

SoSFFloat speed
Field storing feedback speed. This field affects the automatic updating of field 'time'.

tsTime()
Constructor

virtual ~tsTime()
Destructor

Action behavior:

virtual void doAction(SoAction *action)
does default action behaviour. Sets time/speed in tsTimeElement.

virtual void GLRender(SoGLRenderAction *action)
does GLrender begaviour, calls doAction()

virtual void getBoundingBox(SoGetBoundingBoxAction *action)
calls doAction()

virtual void callback(SoCallbackAction *action)
calls doAction()

virtual void pick(SoPickAction *action)
calls doAction()

SoINTERNAL static void initClass()
Makes this class known to the OpenInventor type system.

Last changes:
Stuff to remember last changes.

float _lastSpeed

stamp_t _lastUST
Time stamp when the clock was valid last time!

SbBool _lastValid

Changed Values
Stuff to remember changed values, set on last traversal.

float _changedSpeed

stamp_t _changedUST
UST of last changing. Feedback should be addapted to meet this!

SbBool _timeChanged
Flag, to remember if "time" has changed.

SbBool _speedChanged
Flag, to remember if "speed" has changed.

SoSFTime* _gobalRealTime
global time field, NULL if not existing.

Field-Sensors and CBs.
Sensors and their callbacks, to guard changes of fields "time" and "speed".

SoTimerSensor updateTimeFieldSensor
This sensor is scheduled frequently (TSTIME_UPDATE_FREQUENCY Hz), when 'speed' field != 0. Updates the 'time' field. 'time' field increment calculation is based on _lastUST and 'speed' field.

static void updateTimeFieldCB(void *userData, SoSensor* sensor)
This CB is frequently called from the updateTimeFieldSensor of type SoTimerSensor to increment the 'time' field

SoFieldSensor _timeFldSensor

static void _timeFldChangedCB(void *userData, SoSensor* sensor)
Called immediately after field 'time' has been changed. Sets time stamp of this changing if content has really changed.

SoFieldSensor _speedFldSensor

static void _speedFldChangedCB(void *userData, SoSensor* sensor)
Called immediately after field 'speed' has been changed. Sets time stamp of this changing if content has really changed.


This class has no child classes.
Author:
(c) Andreas Lücke
Version:
0.0
See Also:
{\tt tsTimeElement} {\tt tsTimeCtrlUI}

alphabetic index hierarchy of classes


This page is part of the tsKit's reference manual by Andreas Lücke.
Back to tsKit-Home

generated by doc++