Updated the KeyboardMouseCallback so this it takes into account the the new
passiveMouseMotion support in Producer.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user