week11-0_sample
1. moodle下載 freeglut 拖到桌面
2. 把桌面\freglut\lib\libfreeglut.a 複製成 libglut32.a
3. CodeBlocks開GLUT專案, 目錄選桌面, 專案名取week011-0_sample
week11-1_TRT_again
1.CodeBlocks開GLUT專案, 目錄選桌面, 專案名week11-1_TRT_again
2. GLUT要選桌面的 freeglut
3. 貼上上週week10-1的程式碼
week11-2_obj_gundam_opencv_texture_lighting
1. 安裝 OpenCV 2.1
- 安裝第三步驟, Add OpenCV to system PATH(勾第2或3個, 不要勾第1個)
- 目錄不要改,要用預設的
- 要重開CodeBlocks
2. CodeBlocks 的 settings>compiler 加入 opencv 的3個設定
- Search directories > Compiler 要加上 C:\OpenCV2.1\include
- Search directories > Linker 要加上 C:\OpenCV2.1\lib
- Linker settings 要加上 cv210 / cxcore210 / highgui210
3. 安裝git, 把github上之前寫過的程式複製到桌面
- cd desktop
- git clone https://github.com/xiyu-emma/2024graphicsa
4. 把week09-1_glm_gundam_opencv_texture_lighting拿來用, 複製成week11-2_obj_gundam_opencv_texture_lighting(把09-1都改成11-2)
5. 用Maya開啟week11-2_glm_gundam_opencv_texture_lighting\data\Gundam.obj
-切割模型只剩左手和右手, 分別匯出取名為handA.obj+handA.mtl和handB.obj+handB.mtl6. 把handA.obj+handA.mtl和handB.obj+handB.mtl這4個檔案複製到week11-2_glm_gundam_opencv_texture_lighting\data
7. 新增兩行程式
GLMmodel * handA = NULL;
GLMmodel * handB = NULL;
8. 複製兩個drawmodel分別改成HandA和HandB, 裡面的pmodel也改成handA和handB
9. display函式裡的drawpmodel();改成drawHandA();
10. 最後會出現旋轉的一隻手臂
11. 複製week11-1的myBody函式到這裡
沒有留言:
張貼留言