opengl gluPerspective函数怎么用?gluPerspective(45.0,fAspect,1.0,500.0);glPushMatrix();\x05glTranslatef(0.0f,0.0f,-250.0f);\x05glColor3f(1.0f,0.0f,0.0f);\x05glutSolidSphere(12.0f,15,15); \x05glPopMatrix();gluPerspective可以看到的范围是z
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/21 04:35:08
![opengl gluPerspective函数怎么用?gluPerspective(45.0,fAspect,1.0,500.0);glPushMatrix();\x05glTranslatef(0.0f,0.0f,-250.0f);\x05glColor3f(1.0f,0.0f,0.0f);\x05glutSolidSphere(12.0f,15,15); \x05glPopMatrix();gluPerspective可以看到的范围是z](/uploads/image/z/12655933-61-3.jpg?t=opengl+gluPerspective%E5%87%BD%E6%95%B0%E6%80%8E%E4%B9%88%E7%94%A8%3FgluPerspective%2845.0%2CfAspect%2C1.0%2C500.0%29%3BglPushMatrix%28%29%3B%5Cx05glTranslatef%280.0f%2C0.0f%2C-250.0f%29%3B%5Cx05glColor3f%281.0f%2C0.0f%2C0.0f%29%3B%5Cx05glutSolidSphere%2812.0f%2C15%2C15%29%3B+%5Cx05glPopMatrix%28%29%3BgluPerspective%E5%8F%AF%E4%BB%A5%E7%9C%8B%E5%88%B0%E7%9A%84%E8%8C%83%E5%9B%B4%E6%98%AFz)
opengl gluPerspective函数怎么用?gluPerspective(45.0,fAspect,1.0,500.0);glPushMatrix();\x05glTranslatef(0.0f,0.0f,-250.0f);\x05glColor3f(1.0f,0.0f,0.0f);\x05glutSolidSphere(12.0f,15,15); \x05glPopMatrix();gluPerspective可以看到的范围是z
opengl gluPerspective函数怎么用?
gluPerspective(45.0,fAspect,1.0,500.0);
glPushMatrix();
\x05glTranslatef(0.0f,0.0f,-250.0f);
\x05glColor3f(1.0f,0.0f,0.0f);
\x05glutSolidSphere(12.0f,15,15);
\x05glPopMatrix();
gluPerspective可以看到的范围是z轴的1到500之间,而图形显示在-250图形不在可以看到的范围里面为什么可以显示出来?
opengl gluPerspective函数怎么用?gluPerspective(45.0,fAspect,1.0,500.0);glPushMatrix();\x05glTranslatef(0.0f,0.0f,-250.0f);\x05glColor3f(1.0f,0.0f,0.0f);\x05glutSolidSphere(12.0f,15,15); \x05glPopMatrix();gluPerspective可以看到的范围是z
是这样的,gluPerspective设定的是以你眼睛为坐标起点的一个视口,你设定的是1.0-500
那么以你glulookat里设定的眼睛坐标为起点,在你目标的方向上,距离你眼睛在1.0-500之间的数据都会画出来,其他的都会切掉.比如你设定gluLookAt(0,0,1,0,0,0,0,1,0),在(0,0,1)朝(0,0,0)看,那么-250的距离你当然能看到啊
ps:楼下的回答,好像是我以前回答其他问题的答案,遇到盗版了