2024年5月30日 星期四

Lwy_week15

##week15

##week15-1_PlaySound

1.開新的專案

2.安裝opencv 並設定三個地方 :

- C:\OpenCV2.1\include

- C:\OpenCV2.1\lib

- cv210 cxcore210 highgui210

```cpp

#include <windows.h> ///第一行

```

-----------------------------------------------------------------

```cpp

int main(....)

{

    PlaySound("檔名.wav",NULL,SND_ASYNC);

....

}

``` 


##week15-2_PlaySound_empty

1.開新的專案

2.把程式刪掉

```cpp

#include <windows.h>

int main()

{

    PlaySound("C:/Do.wav",NULL,SND_SYNC);

}

```

現在要把工作執行目錄 : execution working dir改成小數點

再把音檔跟freeglut.dll放到檔案裏面





把原本的註解掉 留最後一行

##week15-3_CMP3_MCI

1.開新的專案

2.把CMP3_MCI.h和sone.mp3和freeglut.dll放到專案裡面

3.把工作執行目錄改成小數點

```cpp

#include "CMP3_MCI.h" //雙引號,很像之前"glm.h"

CMP3_MCI myMP3; //宣告一個變數物件

-------------------------------------------------------------------------

在main()裡

```cpp

int main(....)
{

    myMP3.Load("song.mp3");

    myMP3.Play();

    ...
}

```

新增兩行

##week15-4_mouse_motion_translate_rotate

1.開新的專案

2.貼上11行程式 

3.目標 : 先能移動,旋轉,陣列




移動會有座標


增加第八行 標出中心點


黏著中心點移動
















沒有留言:

張貼留言