using of gluNurbsSurface , terrain

Greetings, all. I have a question. For construction of a landscape I use gluNurbsSurface objects. All is good to be under construction. But I had an additional problem - to be able to define for the given point on the screen (Ñ…,) height of a surface. Whether probably it to make means OpenGL? In general one of the reasons why it is necessary following - can you will prompt as correctly it to solve. In the beginning I build a landscape, then on it I should draw buildings. The building has following characteristics - points (Ñ…,) and height of a building. That they were not groundless and did not bury in the ground to me it is necessary to know local height of a landscape under it. My constructions on the basis of certain data, therefore it is impossible to use all of anything, type 3dMax and so on. All hands.