PDA

View Full Version : Zoom without using GLUT.....and Toggle b/w views



Amijeet
04-28-2010, 03:38 AM
hello,
i am working on my project where a part of it has a graphical 3-D simulation of a spacecraft revolving around the earth..
i m using QT provided by nokia,in which i am not able to use GLUT libraries...so please help me in ..
1.creating a 3D zoom function
2.toggling between different views(global view,close view of spacecraft,close view of earth etc) of the same scene using keys of the keyboard.....
plz reply soon....i have to meet deadlines.
thank you in advance

Exoide
04-28-2010, 05:32 AM
Hi Amijeet,


1.creating a 3D zoom function

To create a 3D zoom you can:

1- vary the Field Of View in your projection
2- vary the dimensions of your viewport
3- you can move the camera forward/backward.


2.toggling between different views(global view,close view of spacecraft,close view of earth etc) of the same scene using keys of the keyboard.....

To have different views of your scene you can assign to each view (each key of the keyboard) a different camera's position.

Amijeet
04-28-2010, 11:24 AM
hi Exoide
thanks for ur reply....but i'm not an expert in opengl programming....can you help me with an example program...or sample code.

Exoide
04-28-2010, 12:28 PM
I don't have an example but I think out there must be a lot of them try googling.

Read this page carefully here's a very good explanation about cameras.

http://glprogramming.com/red/chapter03.html