window entry include FKUTFKUT h int mainint argc
- Slides: 29
今週のサンプルを分析しよう • 赤字部分が 付け足し部分 – 「作りたい図形の種類 図形につける名前」で 作る物を定義 – 定義した名前に対して 命令を呼び出して、 詳細を決めていく – 決まったらwindowに 対して登録(entry) #include "FKUT/FKUT. h“ int main(int argc, char *argv[]) { fkut_Simple. Window window; window. set. Size(800, 600); window. set. BGColor(0. 3, 0. 6, 0. 8); window. open(); fkut_Block. Model block; // ブロックを作る! block. create(10. 0, 10. 0); // 縦横高さが10のブロック block. set. Material(Yellow); // 色は黄色 window. entry(block); // windowへ表示 fkut_Sphere. Model sphere; // 球を作る! sphere. create(8, 10. 0); // 滑らかさ 8、半径10の球 sphere. set. Material(Red); // 色は赤 sphere. gl. Move. To(20. 0, 10. 0, 0. 0); // X 20, Y 10へ移動 window. entry(sphere); // windowへ表示 while(window. update() == true) { // ここに来週以降色々書く } } return 0;
使えるマテリアル一覧 • • • • • Ash. Gray Bamboo. Green Blue Brown Burnt. Titan Coral Cream Cyan Dark. Blue Dark. Green Dark. Purple Dark. Red Dark. Yellow Dim. Yellow Flesh Gloss. Black Grass. Green Gray 1 Gray 2 Green • • • • • Holiday. Sky. Blue Iridescent. Green Ivory Lava. Red Light. Blue Light. Cyan Light. Green Light. Violet Lilac Mat. Black Orange Pale. Blue Pear. White Pink Purple Red Ultra. Marine Violet White Yellow
作例 fkut_Block. Model kushi; // 直方体を 1つ用意、名前は”kushi” kushi. create(1. 0, 70. 0); kushi. set. Material(Green); kushi. gl. Move. To(-2. 5, 0. 0); kushi. gl. Vec(5. 0, 15. 0, 0. 0); window. entry(kushi); // // // fkut_Sphere. Model // 球を 1つ用意、名前は”dango. A, B, C” dango. A, dango. B, dango. C; 縦横高さがの立方体を作る 色は黄色にする 直方体の中心点を指定する 右斜め上を向かせる ↑で先に作ったウィンドウ(window)に表示する dango. A. create(8, 8. 0); dango. A. set. Material(Yellow); dango. A. gl. Move. To(-5. 0, -10. 0, 0. 0); window. entry(dango. A); // ↑で先に作ったウィンドウ(window)に表示する dango. B. create(8, 8. 0); dango. B. set. Material(Yellow); dango. B. gl. Move. To(0. 0, 5. 0, 0. 0); window. entry(dango. B); // ↑で先に作ったウィンドウ(window)に表示する dango. C. create(8, 8. 0); dango. C. set. Material(Yellow); dango. C. gl. Move. To(5. 0, 20. 0, 0. 0); window. entry(dango. C); // ↑で先に作ったウィンドウ(window)に表示する
- Int main int argc char argv
- Include
- Int sum(int a int n) int sum=0 i
- Public void drawsquare(int x, int y, int len)
- Divideint
- Int max(int x int y)
- Interface calculator public int add(int a int b)
- Include stdlib h
- Int main()
- #include stdio.h #include conio.h #include stdlib.h
- Argc
- Glutinit(&argc, argv);
- Interface myinterface int foo(int x)
- Void swap(int a int b)
- Int factorial(int n)
- Void
- Arduino constant int
- Max int
- Int main int num 4
- Nilalaman ng teksto
- Window to window chapter 28
- Window to window chapter 19
- Window width ct
- Greater petrosal nerve branch of
- Johari window personality test