摘要
以三维数据文件3DS为数据源,说明了3DS文件内部数据结构及读取流程,重点讨论了如何有效地解析三维数据,并以合理的数据结构进行保存;阐述了虚拟三维场景中视点的移动位置和目标位置的计算过程,从而实现通过外部设备控制场景的应用;介绍了用OpenGL的选择机制实现三维场景中对象的鼠标定位方法并予以编程实现。实践表明文中设计的算法有效可行,能满足实际应用需求。
Based on 3DS file as data source, internal data structure and accessing process are illustrated. How to parse 3D data effectively and save these data using reasonable data structure are discussed emphatically. Then calculation process of move position and destination position for the viewpoint in virtual 3D scenario is described, thus realize controlling scenarios through the application of an external device. Besides,use OpenGL's selection mechanism to achieve three-dimensional objects in the scene of the mouse positioning methods and programming implementation of this approach are also introduced. Application results show the algorithm designed in this paper is feasible and effective and can meet requirements of real application.
出处
《电子设计工程》
2011年第20期14-17,26,共5页
Electronic Design Engineering
基金
大连民族学院2011年度大学生研究性学习与创新性实验项目(YC2011082)
关键词
3DS
三维选取
视点移动
OPENGL
三维建模
3DS
three-dimensional-selection
viewpoint-movement
OpenGL
three-dimensional-modeling