2017年10月12日 星期四

羅浩倫的學習筆記 Week05

本週學習重點

1.複習上週主題(旋轉etc.)
2.本週主題: viewing
3.範例: jsyeh.org/3dcg10
4.viewing 相關函式&介紹



上課紀錄:

1.先到 jsyeh/3dcg10下載上課用的資料 (data, win32, glut32.dll)

2.解壓縮windows.zip,然後把glut32.dll和data也放到windows資料夾裡,之後執行範例程式Transformation.exe

3.執行第二個範例程式Projection.exe
可以測試gluPerspective()

還有glOrtho() (滑鼠右鍵切換)

函式整理:
1.gluPerspective(fovy, aspect, zNear, zFar); //fovy: 視野大小, aspect: y/x比例
2.glOrtho(左, 右, 下, 上, 近, 遠);
3.gluLookAt(eyex, eyey, eyez,                      //照相機位置
                    centerx, centery, centerz,         //主角位置
                    upx, upy, upz);                          //視野的上方

4.試著編譯範例程式

一些注意的細節:
1.把glm.c, glm.h, projection.c加入到自己的專案裡
2.在freeglut的bin資料夾新增一個data資料夾放al.mtl, al.obj

沒有留言:

張貼留言