2024年5月30日 星期四

電腦圖學week15

 week15-1_PlaySound

先設定好環境

下載freglut
檔名libglut32
OpenCV下載
codeblock打開
setting-compiler打開
search directories 的 compiler
C:\OpenCV2.1\include
search directories 的 linker
C:\OpenCV2.1\lib
Linker setting 加 cv210 cxcore210 highgui210

加一個 #include <windows.h>
加PlaySound



#注意PlaySound( "音檔名稱" , NULL(指標) , SND_SYNC(循序播放) | | SND_ASYNC(一次撥放) )

week15-1-1_Playsound

把撥放音樂的方法改成按鍵撥放


week15-2_PlaySound_empty

把原本main.cpp裡面的東西全刪
加上這些

week15-3_MP3_MCI

把檔案丟到專案目錄裡面
加上函式庫
再加動作

week15-4_mouse_motion_translate_rotate

開新的檔案
貼上10行程式碼
加上mouse函式跟motion函式

就可以移動茶壺
再加上printf把茶壺現在的座標印出來
就可以利用這個程式把旋轉中心點找出來

修改一下 display 函式

再把motion函式也修改




Git 指令

cd desktop

git clone https://github.com/mickey1132/2024-graphicsA

cd 2024-graphicsA

git status

git add .

git status

git config --global user.email mickylin1132@gmail.com

git config --global user.name mickey1132

git commit -m WeekXX

git push

沒有留言:

張貼留言