Improved handling of resetting of the EventQueue::startTick().

This commit is contained in:
Robert Osfield
2011-11-04 12:45:32 +00:00
parent 747654fb6d
commit 0329ca5cea
2 changed files with 38 additions and 10 deletions

View File

@@ -196,11 +196,13 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
void frame(double time);
void setStartTick(osg::Timer_t tick) { _startTick = tick; }
void setStartTick(osg::Timer_t tick) { _startTick = tick; clear(); }
osg::Timer_t getStartTick() const { return _startTick; }
double getTime() const { return osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick()); }
/** clear all events from queue. */
void clear();
/** convenience method for create an event ready to fill in. Clones the getCurrentEventState() to produce a up to date event state. */
GUIEventAdapter* createEvent();