Hi Gianluca,

The AutoTransform adjusts it's internal settings based on the eye
position, which is acquired during the cull traversal.  Have a look at
the implementation of the AutoTransform::accept() to see what is
going.   If you want to find the value of the AutoTransform for a
given camera position prior to the cull traversal then you'll need to
do a dummy cull traversal by creating your own cull visitor.

Robert.

On Mon, Aug 10, 2009 at 11:42 AM, Gianluca
Natale<[email protected]> wrote:
> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to