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:
@@ -93,10 +93,6 @@ class OSGVIEWER_EXPORT Viewer : public ViewerBase, public osgViewer::View
|
||||
|
||||
virtual void updateTraversal();
|
||||
|
||||
void setCameraWithFocus(osg::Camera* camera) { _cameraWithFocus = camera; }
|
||||
osg::Camera* getCameraWithFocus() { return _cameraWithFocus.get(); }
|
||||
const osg::Camera* getCameraWithFocus() const { return _cameraWithFocus.get(); }
|
||||
|
||||
virtual void getCameras(Cameras& cameras, bool onlyActive=true);
|
||||
|
||||
virtual void getContexts(Contexts& contexts, bool onlyValid=true);
|
||||
@@ -119,8 +115,9 @@ class OSGVIEWER_EXPORT Viewer : public ViewerBase, public osgViewer::View
|
||||
|
||||
virtual void viewerInit() { init(); }
|
||||
|
||||
osg::observer_ptr<osg::Camera> _cameraWithFocus;
|
||||
|
||||
void generateSlavePointerData(osg::Camera* camera, osgGA::GUIEventAdapter& event);
|
||||
void generatePointerData(osgGA::GUIEventAdapter& event);
|
||||
void reprojectPointerData(osgGA::GUIEventAdapter& source_event, osgGA::GUIEventAdapter& dest_event);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user