基于OpenGL图形库进行开发三维交互系统时,OpenGL世界坐标和Windows窗口坐标转换是不可避免要面临的问题。众所周知,Windows坐标是二维平面坐标,而OpenGL世界坐标是三维右手笛卡尔坐标系。为解决项目开发中这一问题,首先分析了2种坐标系及其转换过程,然后根据三维实体在Windows上显示的原理建立坐标转换关系,最后,通过调用OpenGL3D图形库中的函数编写模块实现OpenGL世界坐标与Windows坐标的相互转换。结果表明:编写的坐标转换模块坐标转换精确,响应速度快。 更多还原
【Abstract】 Using OpenGL graphic library to develop 3D-interactive system,the transformation between Windows coordinates and OpenGL world coordinates is inevitable.As is known,Windows coordinates is a 2D coordinates system,but world coordinates is a right-handed 3D coordinate system.To solve this problem in project development,an analysis of these two kinds of coordinate system and the transformation process between them was made,then established the principle of coordinate transformation according to the r... 更多还原