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:
@@ -38,6 +38,7 @@ struct ColorWidget: public osgWidget::Widget {
|
||||
}
|
||||
|
||||
bool mouseOver(double x, double y, const osgWidget::WindowManager*) {
|
||||
|
||||
osgWidget::Color c = getImageColorAtPointerXY(x, y);
|
||||
|
||||
if(c.a() < 0.001f) {
|
||||
@@ -45,7 +46,6 @@ struct ColorWidget: public osgWidget::Widget {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user