2024年3月7日 星期四

有喔 電腦圖學 Week03

Week03

    Week03_mouse

        新增一個mouse函式
#void mouse(int botton,int state,int x,int y)
{
    printf("hello mouse\n");
}

下面的main函式要加

glutMouseFunc(mouse);

 

把剛剛打的printf()註解掉


再把剛剛打的再註解掉
改成黃色部分的
這樣可以直接幫忙寫程式



一樣打開
下載 Data/Win32

解壓縮
把Data丟到window裡面




GLTRANSLATEF

用week03_mouse的程式碼修改

改完之後茶壺可以依滑鼠點擊位置移動


GLROTATEF(角度,X,Y,Z)

角度

X=以X為軸進行轉動
Y=以Y軸進行轉動(正讚)
-Y=即倒讚
Z=Z軸(拇指比鼻子)

把上一個的程式碼再拿來修改






GL_MOUSE_TRANSLATE_ROTATE




method 

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

沒有留言:

張貼留言