前言
本文主要介绍一下在OpenGL中用到的各种坐标系,及其之间的转换。
物体坐标系
所谓物体坐标系,是指在物体为中心建立的坐标系。这个非常好理解,如下图所示:

世界坐标系
世界坐标系,是指多个物体使用同一个坐标系,如右手笛卡儿积坐标系。从下图中我们可以看到,上面的物体是正向的,但到了世界坐标系中就有可能变成其它角度。

相机坐标系
相机坐标系,是指从相机的角度观察世界坐标系中的物体的角度。如下图所示:

正投影
正投影,就是将3D图形降维成2D图形。如下图:

屏幕坐标系

纹理坐标系

GL坐标系


网友评论