[osg-users] Hide mouse cursor from CameraManipulator

Robert Osfield robert.osfield at gmail.com
Fri Jan 8 07:58:31 PST 2016

HI Bernard,

The osgViewer::View class subclasses from osgGA::GUIActionAdapter, and
this view is passed on during the event traversal to the event
handler/camera manipulators as the event adapter objects, so you just
need to do a dynamic_cast to get back a View pointer and from the View
you can get the list of GraphicsContext/Windows associated with it.
Then for each of the windows attached to the View you can toggle the


On 8 January 2016 at 09:19, Bernard Dalton <blangel at hotmail.fr> wrote:
> Hi,
> I am working on my own cameraManipulator, it's working pretty well but I'd like to hide the cursor with specific event (clic and drag with left button and clic with right button).
> I know the function GraphicsWindow::useCursor(bool) and it's working well.
> But here I need to call it from inside my CameraManipulator class, and I don't find any way to acces the GraphicWindow object, or the Viewer object.
> I'd like to avoid adding another eventHandler in the class which create the viewer because it's a big project and I don't have write permission on this file.
> So, is there any way to get the Viewer object from inside a CameraManipulator class ?
> Thank you!
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65968#65968
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list