我对透视投影感到困惑.
这是令我困惑的场景.我的frustrum的前平面基本上位于正z轴,背平面位于负轴,并沿着正z轴旋转大约几度.
现在,每当我通过示例时,我都会看到近平面和远平面都存在于负z轴上.
在这种情况下我的方法基本上是这样的:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustrum(-xval,+xval,-yval,+yval,-10,+10);
gluLookAt(); // some point lying on this axis of symmetry about the point
glMatrixMode(GL_MODELVIEW);
Run Code Online (Sandbox Code Playgroud)
所以,在上面的例子中,对于zie的负值和正值,我应该期待的行为是什么,在这种情况下为-10到+10.