osg(osg中文社区)-osgEarth-osgViewer-基于OpenGL-开源三维渲染引擎-图形引擎-虚拟仿真工具-osg教程-osg仿真

Perspective Transformation

当前位置:首页 > 学习支持 > 基础知识

Perspective Transformation is performed by a 4 by 4 matrix with elements in the final column:

Mpersp =  1        0       0       0
       =  0        1       0       0
       =  0        0       1       1/d
       =  0        0       0       0

then [xyz1].Mpersp = [x,y,z,z/d] and as the w coordinate is effectively a scaling factor, items which are further away from the eye are 'shrunk' on the screen pixels. The red book gives a full description of the viewing transforms.