Re: [osg-users] KeySwitchMatrixManipulator

2013-04-13 Thread Tonino Tarsi
Ok Thank you Robert

Cheers,
Tonino

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53622#53622





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


[osg-users] KeySwitchMatrixManipulator

2013-04-12 Thread Tonino Tarsi
I need to know programmatically the current manipulator index .

I was looking for something like 


Code:
int KeySwitchMatrixManipulator::GetMatrixManipulatorIndex()



Bud did not find any. Any suggestion ?

Thanks

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53600#53600





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


Re: [osg-users] KeySwitchMatrixManipulator

2013-04-12 Thread Robert Osfield
Hi Tonino,


On 12 April 2013 14:20, Tonino Tarsi tony.ta...@gmail.com wrote:

 I need to know programmatically the current manipulator index .

 I was looking for something like


 Code:
 int KeySwitchMatrixManipulator::GetMatrixManipulatorIndex()


The KeySwitchMatrixManipulator internally uses a map so doesn't directly
have a concept of mapping an index position to a entry in the map.  The map
itself stores a the int key code, CameraManipulator.  To work out what
the equivalent index postilion is you'll need to get the map and walk
through it to find how far through the map the current active manipulator
is selected.  This is a bit hacky.

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


Re: [osg-users] KeySwitchMatrixManipulator::handle()

2012-09-07 Thread Robert Osfield
HI Gianni,

On 6 September 2012 16:52, Gianni Ambrosio ga...@vi-grade.com wrote:
| does it make sense to add a check in
KeySwitchMatrixManipulator::handle() method to avoid calling
setByMatrix() if the selected manipulator is the current manipulator?

It does make sense, I've added this check in so that it no longer
resets the camera manipulator when the current one is selected.  This
change is now checked into svn/trunk.

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


Re: [osg-users] KeySwitchMatrixManipulator::handle()

2012-09-07 Thread Gianni Ambrosio
Thank you Robert.
Gianni

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49841#49841





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


[osg-users] KeySwitchMatrixManipulator::handle()

2012-09-06 Thread Gianni Ambrosio
Hi,
does it make sense to add a check in KeySwitchMatrixManipulator::handle() 
method to avoid calling setByMatrix() if the selected manipulator is the 
current manipulator?

Regards,
Gianni

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49819#49819





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


[osg-users] KeySwitchMatrixManipulator

2012-02-22 Thread Gianni Ambrosio
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?

Regards,
Gianni

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45690#45690





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


Re: [osg-users] KeySwitchMatrixManipulator

2012-02-22 Thread Robert Osfield
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