Figuring 3D Viewable Space

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?

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?

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.

if you are wondering the viewing frustum… on http://www.gametutorials.com has tutorial on frustum culling.

also see the faq