PDA

View Full Version : Zoom window in perspective



abhinav_80
09-05-2002, 02:20 AM
I am not getting how to have a rectangular
portion of my object get zoomed using Perspective Projection.
Basically, I want zoom window using Perspective Projection.
I am using
gluPerspective(45.0f, aspect_ratio, 0.01, 100.0);
Any idea will be a great help.

mikael_aronsson
09-05-2002, 03:59 AM
Hi !

You can cheat by changing the field of view angle to something else, or you can move the "camera" closer to the object.

If you mean that you want to draw a rubberband rectangle in a window and zoom in that area, then it might be a little more tricky.

Mikael

Robbo
09-05-2002, 05:40 AM
Don't panic. I have an example of this at home I will post up tonight. It was featured as a tutorial somewhere - might even have been here way back.

This guy made an app to rubber band a rotating cube and automatically `zoom' the FOV to the correct size -

Mazy
09-05-2002, 06:04 AM
Mikael.. changing FOV isnt cheating, that is how a ZOOM really works.. you dont walk closer with your camera when you zoom, do you? :-)

abhinav_80
09-05-2002, 07:24 PM
Thanx Robbo,
but where will you post it.
I know that i have to change the FOV by some amount, but i dont know by what factor, since
i want exactly that part of the object or scene to be zoomed which is selected inside the zoom window or rectangle.

Regards
abhinav



Originally posted by Robbo:
Don't panic. I have an example of this at home I will post up tonight. It was featured as a tutorial somewhere - might even have been here way back.

This guy made an app to rubber band a rotating cube and automatically `zoom' the FOV to the correct size -

Batti
09-06-2002, 03:28 PM
Hi!
I would really love to have a look at this application too, Robbo is speaking about. So if there is any possibility, I would be very grateful!
Regards, Batti

Miguel_dup1
09-06-2002, 06:51 PM
There is a link to some code on my page, cant remember the link to the code but it is there...
http://cheo.resnet.wayne.edu/miguel/

[This message has been edited by mancha (edited 09-06-2002).]