Further work on event handling in CompositeViewer

This commit is contained in:
Robert Osfield
2007-01-16 14:15:49 +00:00
parent c7211f41ec
commit 46b9c19fb5
2 changed files with 57 additions and 112 deletions

View File

@@ -312,6 +312,8 @@ void View::requestContinuousUpdate(bool)
void View::requestWarpPointer(float x,float y)
{
osg::notify(osg::NOTICE)<<"View::requestWarpPointer("<<x<<","<<y<<")"<<std::endl;
float local_x, local_y;
const osg::Camera* camera = getCameraContainingPosition(x, y, local_x, local_y);
if (camera)
@@ -326,6 +328,10 @@ void View::requestWarpPointer(float x,float y)
const_cast<osgViewer::GraphicsWindow*>(gw)->requestWarpPointer(local_x, local_y);
}
}
else
{
osg::notify(osg::NOTICE)<<"View::requestWarpPointer failed no camera containing pointer"<<std::endl;
}
}
bool View::containsCamera(const osg::Camera* camera) const