PDA

View Full Version : Figuring 3D Viewable Space



nstod
03-20-2002, 11:57 AM
In a program I am writing at the moment, i am trying to figure the actual viewable space that the camera is looking at. To better explain this, I have a map that I view from the top view, and when I zoom in and out, how can I tell when I click the mouse, the actual x and z values that I am clicking on. Can anyone help me?

nexusone
03-20-2002, 12:26 PM
Well your viewing area is relative to how you have setup the camara view.

You will find examples of what you are looking for at http://nehe.gamedev.net



Originally posted by nstod:
In a program I am writing at the moment, i am trying to figure the actual viewable space that the camera is looking at. To better explain this, I have a map that I view from the top view, and when I zoom in and out, how can I tell when I click the mouse, the actual x and z values that I am clicking on. Can anyone help me?

Furrage
03-21-2002, 08:13 AM
Originally posted by nstod:
I have a map that I view from the top view, and when I zoom in and out, how can I tell when I click the mouse, the actual x and z values that I am clicking on.
Have a look at gluUnproject. You can do a search in this forum as this has been discussed many times.

chxfryer
03-21-2002, 04:01 PM
if you are wondering the viewing frustum... on http://www.gametutorials.com has tutorial on frustum culling.

zed
03-21-2002, 11:52 PM
also see the faq