Updated the KeyboardMouseCallback so this it takes into account the the new

passiveMouseMotion support in Producer.
This commit is contained in:
Robert Osfield
2003-01-18 10:17:28 +00:00
parent 0bc11fcbf1
commit 13aa469628
2 changed files with 16 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ class OSGPRODUCER_EXPORT KeyboardMouseCallback : public Producer::KeyboardMouseC
virtual void mouseMotion( float mx, float my);
virtual void passiveMouseMotion( float mx, float my);
virtual void buttonPress( float mx, float my, unsigned int mbutton );
virtual void buttonRelease( float mx, float my, unsigned int mbutton );

View File

@@ -60,6 +60,20 @@ void KeyboardMouseCallback::mouseMotion( float mx, float my)
}
void KeyboardMouseCallback::passiveMouseMotion( float mx, float my)
{
_mx = mx;
_my = my;
osg::ref_ptr<EventAdapter> event = new EventAdapter;
event->adaptMouseMotion(getTime(),mx,my);
_eventQueueMutex.lock();
_eventQueue.push_back(event);
_eventQueueMutex.unlock();
}
void KeyboardMouseCallback::buttonPress( float mx, float my, unsigned int mbutton )
{
_mx = mx;