From Jason Beverage, merged from svn/trunk revision 12723, "Here is a small fix for getCameraContainingPosition. getXMin was

being used in a case where getYMin should be used instead."
This commit is contained in:
Robert Osfield
2011-07-28 07:47:06 +00:00
parent ad817735cf
commit 14b8c242cf

View File

@@ -2007,7 +2007,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
new_x = static_cast<double>(_camera->getGraphicsContext()->getTraits()->width) * (x - eventState->getXmin())/(eventState->getXmax()-eventState->getXmin());
new_y = view_invert_y ?
static_cast<double>(_camera->getGraphicsContext()->getTraits()->height) * (1.0 - (y- eventState->getYmin())/(eventState->getYmax()-eventState->getYmin())) :
static_cast<double>(_camera->getGraphicsContext()->getTraits()->height) * (y - eventState->getYmin())/(eventState->getYmax()-eventState->getXmin());
static_cast<double>(_camera->getGraphicsContext()->getTraits()->height) * (y - eventState->getYmin())/(eventState->getYmax()-eventState->getYmin());
}
if (viewport &&