摘要
本文介绍了一种基于OpenGL的三维拾取方法,该方法可对三维地形图上的任意点进行拾取,并反馈拾取点的三维信息。在正交投影模型中,将整个图形划分成若干块均匀区域,先判断二维输入点落在哪块区域;然后再对选中的区域细化,判断输入点所选中的图元,并根据该图元的顶点信息求出二维输入设备所对应的第三维的值;最终返回该拾取点在物体坐标系下的真实三维坐标,从而实现图形交互功能。
A picking method to any point in a 3-D relief map based on OpenGL is presented in this paper. In the orthoprojection model, the total relief map is divided into many uniform fields. First, it is judged that the point made by a 2-D input device is included by which field in the 3 D relief map. Second, it filters rigorously each graphics unit in the selected field, in order to judge which graphics unit is exactly selected by the input point. Third, according to the vertex value of the selected graphics unit, the third dimensional value, which is corresponding to the 2-D input device, is gained precisely. Finally, the true 3-D coordinate of any selected point is fed back so as to realize the function of graphic alternation
出处
《计算机工程与科学》
CSCD
2006年第1期45-46,70,共3页
Computer Engineering & Science