From d43dbaeadd0983565b17261aad996ac4fd8fb1ed Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 14 Mar 2006 13:18:21 +0000 Subject: [PATCH] Build fixes --- VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp | 4 ---- include/osgGA/EventQueue | 3 +++ src/osgGA/EventQueue.cpp | 7 +++++++ src/osgPlugins/txp/TXPPagedLOD.cpp | 2 +- src/osgProducer/KeyboardMouseCallback.cpp | 2 +- src/osgProducer/Viewer.cpp | 5 ++--- src/osgWrappers/osgGA/EventQueue.cpp | 1 + src/osgWrappers/osgGA/GNUmakefile | 1 - 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp b/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp index ef0452198..16f38f29e 100644 --- a/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp +++ b/VisualStudio/osgWrappers/osgGA/wrapper_osgGA.dsp @@ -103,10 +103,6 @@ SOURCE=..\..\..\src\osgWrappers\osgGA\AnimationPathManipulator.cpp SOURCE=..\..\..\src\osgWrappers\osgGA\DriveManipulator.cpp # End Source File -# Begin Source File -SOURCE=..\..\..\src\osgWrappers\osgGA\Event.cpp -# End Source File - # Begin Source File SOURCE=..\..\..\src\osgWrappers\osgGA\EventQueue.cpp # End Source File diff --git a/include/osgGA/EventQueue b/include/osgGA/EventQueue index 78f24a0d4..930f831b0 100644 --- a/include/osgGA/EventQueue +++ b/include/osgGA/EventQueue @@ -57,6 +57,9 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced /** method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */ void mouseScroll(GUIEventAdapter::ScrollingMotion sm); + /** method for updating in response to a mouse warp. Note, just moves the mouse position without creating a new event for it.*/ + void mouseWarp(float x, float y); + /** method for adapting mouse motion events whilst mouse buttons are pressed, placing this event on the back of the event queue.*/ void mouseMotion(float x, float y); diff --git a/src/osgGA/EventQueue.cpp b/src/osgGA/EventQueue.cpp index 23c119263..8fbd6eb9a 100644 --- a/src/osgGA/EventQueue.cpp +++ b/src/osgGA/EventQueue.cpp @@ -96,6 +96,13 @@ void EventQueue::mouseScroll(GUIEventAdapter::ScrollingMotion sm) addEvent(event); } +void EventQueue::mouseWarp(float x, float y) +{ + _accumulateEventState->setX(x); + _accumulateEventState->setY(y); +} + + void EventQueue::mouseMotion(float x, float y) { _accumulateEventState->setX(x); diff --git a/src/osgPlugins/txp/TXPPagedLOD.cpp b/src/osgPlugins/txp/TXPPagedLOD.cpp index e15a0f012..eb656518b 100644 --- a/src/osgPlugins/txp/TXPPagedLOD.cpp +++ b/src/osgPlugins/txp/TXPPagedLOD.cpp @@ -110,7 +110,7 @@ osg::BoundingSphere TXPPagedLOD::computeBound() const if (_centerMode==USER_DEFINED_CENTER && _radius>=0.0f) { - float tempRadius = std::max( _radius, result.radius() ); + float tempRadius = osg::maximum( _radius, result.radius() ); result = osg::BoundingSphere(_userDefinedCenter,tempRadius); } return result; diff --git a/src/osgProducer/KeyboardMouseCallback.cpp b/src/osgProducer/KeyboardMouseCallback.cpp index 54659dbc9..66237478f 100644 --- a/src/osgProducer/KeyboardMouseCallback.cpp +++ b/src/osgProducer/KeyboardMouseCallback.cpp @@ -90,7 +90,7 @@ void KeyboardMouseCallback::passiveMouseMotion( float mx, float my) void KeyboardMouseCallback::mouseWarp( float mx, float my) { updateWindowSize(); - if (_eventQueue.valid()) _eventQueue->mouseMotion(mx,my); // need mouse warp?? + if (_eventQueue.valid()) _eventQueue->mouseWarp(mx,my); // need mouse warp?? } diff --git a/src/osgProducer/Viewer.cpp b/src/osgProducer/Viewer.cpp index fb691cd43..55f8ad1a4 100644 --- a/src/osgProducer/Viewer.cpp +++ b/src/osgProducer/Viewer.cpp @@ -923,10 +923,9 @@ void Viewer::requestWarpPointer(float x,float y) { if (_kbmcb.valid() && isRealized()) { - osg::notify(osg::INFO) << "requestWarpPointer x= "<