Introduced new scheme for handling mouse events with osgViewer. The new scheme enables robust event handling even when using distortion correction render to texture Cameras.
This commit is contained in:
@@ -72,7 +72,7 @@ bool OccluderEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAct
|
||||
{
|
||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa);
|
||||
osgUtil::LineSegmentIntersector::Intersections intersections;
|
||||
if (view && view->computeIntersections(ea.getX(), ea.getY(), intersections))
|
||||
if (view && view->computeIntersections(ea, intersections))
|
||||
{
|
||||
const osgUtil::LineSegmentIntersector::Intersection& hit = *(intersections.begin());
|
||||
if (hit.matrix.valid()) addPoint(hit.localIntersectionPoint * (*hit.matrix));
|
||||
|
||||
Reference in New Issue
Block a user