hybr wrote:
> Hi, Ron
> 
> What meaning would have BOTH option?
> 
> Each of HORIZONTAL and VERTICAL keep your projection aspect ratio same as 
> window aspect ratio, difference is which one of horizontal fow or vertical 
> fow they keep constant ( other is changed to match window aspect ratio ).
> 
> Cheers,
> Sergey.
> 
> 


Hi Sergey,
I am using orthographic projection.
When the window size changes it is not enough just to adjust only the width or 
only the height of the frustum (projection matrix of camera), since doing that 
will distort the objects in the world in one axis, wouldn't it? I understand 
that maintaining an equal aspect ratio between the window and projection matrix 
can be done by modifying only one axis, but I also want to avoid my objects 
getting stretched or contracted in one axis.

For example, let's say we start with a window of size 100X100, and a camera 
with an orthographic projection matrix of:
(left, right, bottom, top) = (-50, 50, -50, 50). [ignoring near, far]

Now the user modifies the window size to 50X75.
If we only scale the projection matrix horizontally this means that our new 
projection matrix has the values of:
(left, right, bottom, top) = (-25, 25, -50, 50).
The width of the frustum was scaled by 1/2, but the height of the frustum did 
not change.

The window height is now 75, which means the objects will not look correct in 
their Y values after the viewport transformation.

On the other hand, I may be wrong, since there is no "BOTH" resize policy, for 
a good reason that I can't see ... so I am trying to understand where is my 
mistake.

Thanks  :D

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to