[osg-users] odd scene resize

Robert Osfield robert.osfield at gmail.com
Wed Sep 7 07:00:02 PDT 2016

HI Gianni,

The FIXED refers to the Projection Matrix, it means it doesn't change
as you change the viewport dimensions.  It does *exactly* what it
says.  If you change the aspect ratio of the viewport without changing
the projection matrix you will get a distorted scene for a 3D scene.
There are usage cases where this is exactly what the user will want.

What you are after is not FIXED, really not sure exactly what you
want, only you know what this might be and might recognize it when you
see it.   It sounds like you want to adjust both the vertical and
horizontal field of view in some way that keeps the aspect ratio
consistent, you say some combination of, but there isn't constraint to
say what scale to use.

What you need to do is work out what you are after and implement the
adjust of the projection matrix you are after.



On 7 September 2016 at 14:47, Gianni Ambrosio <g.ambrosio+osg at gmail.com> wrote:
> Hi Sebastian,
> the FIXED option is right the opposite of what I'm looking for.
> I mean, if there are HORIZONTAL and VERTICAL options, there should be one option that is HORIZONTAL+VERTICAL and one option that is NO-HORIZONTAL+NO-VERTICAL. So one case seems missing.
> I try to explain in detail.
> ProjectionResizePolicy = VERTICAL:
> If I resize the window horizontally, then the scene is resized without distortions.
> While ... resizing the window vertically, the scene is not resized at all!
> ProjectionResizePolicy = HORIZONTAL:
> The opposite of HORIZONTAL case.
> ProjectionResizePolicy = FIXED:
> Scene completly distorted.
> Now, first of all FIXED is not a combination of both HORIZONTAL and VERTICAL from my point of view.
> Second, what I'm looking for is exactly a combination of HORIZONTAL and VERTICAL. Where resizing the window horizontally or vertically, the scene is resized in both cases to fit the viewer rectangle without distortions.
> Cheers,
> Gianni
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68549#68549
> _______________________________________________
> 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