Build fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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??
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -923,10 +923,9 @@ void Viewer::requestWarpPointer(float x,float y)
|
||||
{
|
||||
if (_kbmcb.valid() && isRealized())
|
||||
{
|
||||
osg::notify(osg::INFO) << "requestWarpPointer x= "<<x<<" y="<<y<<std::endl;
|
||||
osg::notify(osg::NOTICE) << "requestWarpPointer x= "<<x<<" y="<<y<<std::endl;
|
||||
|
||||
getEventQueue()->getCurrentEventState()->setX(x);
|
||||
getEventQueue()->getCurrentEventState()->setY(y);
|
||||
getEventQueue()->mouseWarp(x,y);
|
||||
_kbmcb->getKeyboardMouse()->positionPointer(x,y);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ BEGIN_OBJECT_REFLECTOR(osgGA::EventQueue)
|
||||
I_Method1(void, addEvent, IN, osgGA::GUIEventAdapter *, event);
|
||||
I_Method4(void, windowResize, IN, float, Xmin, IN, float, Ymin, IN, float, Xmax, IN, float, Ymax);
|
||||
I_Method1(void, mouseScroll, IN, osgGA::GUIEventAdapter::ScrollingMotion, sm);
|
||||
I_Method2(void, mouseWarp, IN, float, x, IN, float, y);
|
||||
I_Method2(void, mouseMotion, IN, float, x, IN, float, y);
|
||||
I_Method3(void, mouseButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button);
|
||||
I_Method3(void, mouseButtonRelease, IN, float, x, IN, float, y, IN, unsigned int, button);
|
||||
|
||||
@@ -4,7 +4,6 @@ include $(TOPDIR)/Make/makedefs
|
||||
CXXFILES =\
|
||||
AnimationPathManipulator.cpp\
|
||||
DriveManipulator.cpp\
|
||||
Event.cpp\
|
||||
EventQueue.cpp\
|
||||
EventVisitor.cpp\
|
||||
FlightManipulator.cpp\
|
||||
|
||||
Reference in New Issue
Block a user