Hi All.
I have this problem, with OSG 2.8.0.

 

In my scenegraph there is some object attached as a child of an
Autotransform matrix
(I need to keep its size constant on the screen, wherever is the camera).

I have also to fit the model in the screen, using the global bounding sphere
of the model.
I've seen that the bounding sphere is computed during the rendering
traversal.

And that the bounding sphere of "auto-transformed" objects changes as the
camera position
changes, while the bounding sphere of the other objects is constant. This is
what I expected, since
the size on the screen must be constant.



So, I thought that I can compute the global bounding sphere of my model by
multiple iterative redraws,

until the global bounding sphere at step n is almost the same as that at
step n-1.
And it works.

 

Is there a way to update the bounding sphere of autotransformed object
without redrawing?
I mean, I would need to show directly the model fit in the screen, without
showing the user all the single steps.
Or, at least, may I avoid the swap of back and front buffers at the end of
redraw? In this way I could
make the back and front buffers be swapped only at the end of fit.

 

Thanks in advance

Gianluca Natale

 

 

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

Reply via email to