Various work on osgViewer library, including warp point and graphics window resize support
This commit is contained in:
@@ -86,6 +86,9 @@ class GraphicsWindowX11 : public osgViewer::GraphicsWindow
|
||||
/** Get focus on if the pointer is in this window.*/
|
||||
virtual void grabFocusIfPointerInWindow();
|
||||
|
||||
// Override from GUIActionAdapter
|
||||
virtual void requestWarpPointer(float x,float y);
|
||||
|
||||
protected:
|
||||
|
||||
bool createVisualInfo();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace osgViewer {
|
||||
|
||||
/** View holds a single view on a scene, this view may be composed of one or more slave cameras.*/
|
||||
class OSGVIEWER_EXPORT View : public osg::View
|
||||
class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -50,6 +50,9 @@ class OSGVIEWER_EXPORT View : public osg::View
|
||||
/** Convinience method for creating slave Cameras and associated GraphicsWindows across all screens.*/
|
||||
void setUpViewAcrossAllScreens();
|
||||
|
||||
virtual void requestRedraw();
|
||||
virtual void requestContinuousUpdate(bool needed=true);
|
||||
virtual void requestWarpPointer(float x,float y);
|
||||
|
||||
public:
|
||||
|
||||
@@ -57,6 +60,7 @@ class OSGVIEWER_EXPORT View : public osg::View
|
||||
|
||||
void assignSceneDataToCameras();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~View();
|
||||
|
||||
@@ -54,6 +54,10 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
/** Clean up all OpenGL objects associated with this viewer's scenegraph.*/
|
||||
virtual void cleanup();
|
||||
|
||||
void setCameraWithFocus(osg::Camera* camera) { _cameraWithFocus = camera; }
|
||||
osg::Camera* getCameraWithFocus() { return _cameraWithFocus.get(); }
|
||||
const osg::Camera* getCameraWithFocus() const { return _cameraWithFocus.get(); }
|
||||
|
||||
public:
|
||||
|
||||
void init();
|
||||
@@ -66,6 +70,8 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
|
||||
osg::ref_ptr<osg::BarrierOperation> _startRenderingBarrier;
|
||||
osg::ref_ptr<osg::BarrierOperation> _endRenderingDispatchBarrier;
|
||||
|
||||
osg::observer_ptr<osg::Camera> _cameraWithFocus;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user