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:
@@ -268,9 +268,9 @@ public:
|
||||
{
|
||||
osg::Group* root = dynamic_cast<osg::Group*>(viewer->getSceneData());
|
||||
if (!root) return;
|
||||
|
||||
|
||||
osgUtil::LineSegmentIntersector::Intersections intersections;
|
||||
if (viewer->computeIntersections(ea.getX(),ea.getY(),intersections))
|
||||
if (viewer->computeIntersections(ea,intersections))
|
||||
{
|
||||
const osgUtil::LineSegmentIntersector::Intersection& hit = *intersections.begin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user