(2)攝影機、投影矩陣
1.下載window.zip→ 解壓縮
data.zip→解壓縮
glut32.dll
2.將data,glut32.dll放入windows
3.開啟projection
4.
視野大小 大小比例 前面那個面 後面那個面
fovy aspect zNear zFar
gluperspective(48.0 , 1.12 , 1.0 , 1.9 )
5.#include <math.h>void motion(int x,int y){ float angle=x; float cameraY =(y-300)/100.0; glMatrixMode(GL_MODELVIEW); glLoadIdentity() ; gluLookAt(5*cos(angle),cameraY,5*sin(angle), 0,0,-6, 0,1,0); glutPostRedisplay();}glutMotionFunc(motion);glutMotionFunc(motion);




沒有留言:
張貼留言