Hi Gianni, Vincent,

isn't that problem the same as having a cross axes fixed in a corner of
the viewer and rotates accordingly to the scene? If so, after looking at
the osgautotransform example I don't think it would solve the problem,
but I hope someone can help us :)

Please search the archives, there was a discussion about this a few months ago and from reading that discussion I was able to code up a class that can do both (a compass and axes) depending on a setting passed to the constructor. In one app (in a marine scenario) we display a compass, and in another (kind of like a modeling app) we display axes.

In my case, I created an ortho camera that I put in the scene graph, and that has a cull callback that will change its view matrix based on the main camera's view direction (it's a slightly different calculation for compass mode than for axes mode - I'll leave the exact calculations as an exercise for the reader :-) ). Then the model you want (compass or axes) is under that camera. It's as simple as that.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to