|
From: Keith W. <kw...@cs...> - 2004-06-23 21:04:55
|
Can I easily take a pixel coordinate and determine which 3D object is under that pixel, in other words which 3D object (or actual triangle or trimesh I suppose) is shallowest in the z-buffer at the pixel's location? I know Open-GL has routines for this sort of thing. How would this be done in QD3D or Quesa? Or can it not easily be done? It would be useful for a program/game I'm working on because the user could click on parts of a rendered scene to interact with objects in the scene, but that will only work if I can figure out what has been clicked on, right? I mean, I could force the user to line the camera up perfectly straight with an object and then interact with it on the assumption that it's the object directly ahead of the camera's forward-vector in world space, but that's a tedious requirement to place on the user. Thanks. ________________________________________________________________________ Keith Wiley kw...@cs... http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley "Yet mark his perfect self-contentment, and hence learn his lesson, that to be self-contented is to be vile and ignorant, and that to aspire is better than to be blindly and impotently happy." -- Edwin A. Abbott, Flatland ________________________________________________________________________ |