Hi.
I'm going to use OSG as one of my game engine components. Currently I
have Timer singleton. Classes that wish to be notified regularly
should inherit from TimerListener and add themselves to the queue like
Timer->addListener(this, 30); where 30 is 30 milliseconds, i.e., they
will be notified approximately each 30 milliseconds. In listeners I do
'animations' (moving, scaling, etc).
In OSG, however, each node gets traversed, even several times.
Currently I'm unsure how to implement my new Timer with OSG. The
single deciding Timer class seems to require less power, since it
doesn't call each listener each frame, instead, it knows when to call
each listener and only does it when necessary.
May be I'm misunderstanding current visitor pattern? May be it's
really necessary to traverse each listener each frame and let each
listener decide?
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to