[osg-users] Possible Bug in osg::AutoTransform

Robert Osfield robert.osfield at gmail.com
Tue Jul 24 01:15:53 PDT 2007


Hi Nelson,

This isn't a bug, when you do scale to screen what it does it uses
puts the subgraph into screen space by adjusting the scale parameter
to fit.  If you want to change the scale of the subgraph then it'll
need to built with screen space coords in mind.

Robert.

On 7/24/07, Cysneros, Nelson SPAWAR <nelson.cysneros at navy.mil> wrote:
>
>
> I think their might be a bug with osg::AutoTransform object.  I'm using the
> setAutoScaleToScreen() function and it works as expected (the transform
> object stays the same size on the screen no matter how much you zoom in or
> out), but you don't have any control over the initial size of the object.  I
> would like to set the initial size of the transform with the setScale()
> function, but once you use the setAutoScaleToScreen() function, the
> setScale() function does not have any affect on the object.
>
> I was able to duplicate the problem with the osgautotransform.cpp example.
> (File is attached)
>
>             osg::AutoTransform* at = new osg::AutoTransform;
>             at->setPosition(pos);
>
>             at->setScale(100000);  //vec3 argument does not work either
>             at->setAutoScaleToScreen(true); //Scale does not work with this
> on
>
>
> The above code has no affect on the scaling unless  you set
> setAutoScaleToScreen to false.
>
>
>
> Thank you
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>


More information about the osg-users mailing list