Hi Peter,

If you are looking for a virtual void OnTimer() you're out of luck ;)

the osg::Timer class is simple and smart and wraps the
high-performance timer on Windows. I typically uses it as a timer in
state machines like

osg::Timer_t enterState;
double timeInState;

void update()
{
  osg::Timer_t tick = osg::Timer::instance()->tick();
  if ( osg::Timer::instance()->delta_s(enterState, tick) > timeInState )
  {
    nextState();
    enterState = tick;
  }
}

my 2p
Mattias

On 6/5/08, Peter Wraae Marino <[EMAIL PROTECTED]> wrote:
> Hi users,
>
> ok.. this might be a silly question,, but here goes.
>
> does osg have any form of a timer-callback or do I have to create it myself
> using an update callback?
>
> regards,
> Peter
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to