Thanks Nick,
I implement it but some modifications caused another problem I don't understand.

In the old code I created a cross axes with size=1.5 for each axis. The ortho 
camera was defined as follows:

camera->setProjectionMatrix(osg::Matrix::ortho2D(-1.7, 17.75, -1.7, 13.86));

Then I had to fix the resize problem as you suggested. So, on resize event I 
used the actual viewer width and height. Here is basically the call:

camera->setProjectionMatrix(osg::Matrix::ortho2D(-axisSize, iWidth-axisSize, 
-axisSize, iHeight-axisSize));

but the axis size=1.5 was to small in this case and I had to increase it to 70 
to be seen.

Now the problem.
On top of each axis an osgText to diplays the labels X, Y and Z. When an axis 
points towards out of the screen (more or less) the label disappears. In the 
previous implementation with axis size=1.5 it worked correctly. Can you please 
explain me why?

Regards
Gianni

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





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

Reply via email to