HI Gianni,

On 22 February 2012 16:17, Gianni Ambrosio <ga...@vi-grade.com> wrote:
> Hi,
> I set my own KeySwitchMatrixManipulator in an osg viewer as follows:
>
> osgViewer::View::setCameraManipulator(keyswitchManipulator.get());
>
> Now, is there a way to set one of the manipulators programmatically? I mean, 
> the default manipulator is a TrackballManipulator, but in a particular case I 
> would like to force a NodeTrackerManipulator (the second one in the 
> KeySwitchMatrixManipulator list). Can you help me please?

You simply use KeySwitchMatrixManipulator::selectMatrixManipulator(num)
where num is the index of the manipulator you want to select.  See the
applications/osgviewer/osgviewer.cpp to see an example of this in
action.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to