2024年4月15日 星期一

Yxin week09

 WEEK09

#設定OpenCV

設定好OpenCV 安裝 OpenCV-2.1, 要加PATH,用預設目錄

1.設定貼圖的3個設定 Setting-Compiler

1.1.在Search directories 加入2個目錄

    Compiler 加入 C:\OpenCV2.1\include

    Linker 加入C:\OpenCV2.1\lib

    Linker setting 裡,加入3個 cv210 cxcore210 highgui210


#week09-1_gundam_texture_lighting_rotate_lighting

前個目錄 week07-2_obj_gundam_opencv_texture copy 

1.用notepad++開啟week09-1_obj_gundam_opencv_texture_lighting 目錄.cbp檔

2.把打光的8行 貼在int main()前面

3.把打光的12+2行函式,貼到glutMainLoop()前面

4.glmDraw(pmodel,GLM_SMOOTH|GLM_TEXTURE)刪掉中間GLM_MATERIAL\

改變光的位置




加入旋轉

#week09-2_glutSolidCube_glutSolidTeapot_glutSolidSphere

1.加入glutSolidTeapot(0.3)和glutSolidCube(0.3)和glutSolidSphere(0.2,30,30);

2.配合glPushMatrix() glTranslatef() glPopMatrix() 來移動

#week09-3_glutWireCube_glutWireTeapot_glutWire_Sphere

Solid改Wire改座標





沒有留言:

張貼留言