The database automatically creates one global field when
SoDB::init() is called. The
realTime global field, which is of type
SoSFTime, can be connected to engines and nodes for real-time animation. The database will automatically
update the
realTime global field 12 times per second, using a timer sensor. Typically, there will be a node sensor on the root of the scene graph which schedules a redraw whenever the scene graph changes; by
updating the
realTime global field periodically, scene graphs that are connected to
realTime (and are therefore animating) will be redrawn. The rate at which the database updates
realTime can be controlled with this routine.
Passing in a zero time will disable automatic update of
realTime. If there are no enabled connections from the
realTime field to any other field, the sensor is automatically disabled. .p Note that the
SoSceneManager
class automatically updates realTime immediately after redrawing, which will result in as high a frame rate as possible if the scene is continuously animating. The SoDB::setRealTimeInterval method ensures
that engines that do not continuously animate (such as
SoTimeCounter) will eventually be scheduled.