PDA

View Full Version : Query on Zoom Factor



mdhesina
05-17-2005, 12:41 PM
Hi all,

I wanted to know how to compute the zoom factor. I know that when we zoom in and out of a scene we change the viewport to move closer/farther to the model. I am using an application which prints the zoom factor dynamically whenever I zoom in and out of the model using the middle mouse button event and I am curious to know how it arrives at the zoom factor value.

Any help would be appreciated.

Thanks

mikael_aronsson
05-17-2005, 10:58 PM
Moving the "camera" closer to the object is not zooming, it just looks a little like it, if you want to make real zooming you should change the field of view instead and not move the "camera", if you use gluPerspective, just change the first parameter otherwise you have to calculate it yourself.

Mikael