annotate TaskManager/Test/test_render/untitled.cpp @ 383:b3fb0013e6b2 draft

fix header, MemHash in kernel
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 06 Aug 2009 12:04:55 +0900
parents 7bd052a53996
children ce86b0186a4a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
231
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #include <stdlib.h>
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 #include "SceneGraphRoot.h"
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
3 #include "SGList.h"
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 #include <math.h>
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
5
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 static void
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 cubetest_collision(SceneGraphPtr node, int screen_w, int screen_h,
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
8 SceneGraphPtr tree)
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
11
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
12 static void
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 test_collision(SceneGraphPtr node, int screen_w, int screen_h,
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
14 SceneGraphPtr tree)
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 {
237
admin@mb22-no-macbook-2.local
parents: 231
diff changeset
16 // test
231
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
18
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
19 static void
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
20 test_move(SceneGraphPtr node, int screen_w, int screen_h)
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
22
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
23 node->angle[0] += 10.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 /*
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
25 node->stack_xyz[0] = 2.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
26 node->stack_xyz[1] = 2.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
27
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
28 //node->xyz[0] += node->stack_xyz[0];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
29 node->xyz[0] += node->stack_xyz[0];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
30 node->xyz[1] += node->stack_xyz[1];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
31
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
32 if ((int)node->xyz[0] > screen_w
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
33 || (int)node->xyz[0] < 0) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
34 node->stack_xyz[0] = -node->stack_xyz[0];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
35 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
36
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
37 if ((int)node->xyz[1] > screen_w
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
38 || (int)node->xyz[1] < 0) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
39 node->stack_xyz[1] = -node->stack_xyz[1];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
40 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
41
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
42 if ((int)node->xyz[2] > 1000
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
43 || (int)node->xyz[2] < 100) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
44 node->stack_xyz[1] = -node->stack_xyz[1];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
45 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
46 */
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
47
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
48 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
49
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
50 static void
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
51 cubetest_move(SceneGraphPtr node, int screen_w, int screen_h)
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
52 {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
53 node->angle[1] += 10.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
54 if (node->angle[1] > 360.0f) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
55 node->angle[1] = 0.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
56 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
57 //node->xyz[0] = screen_w/2;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
58 node->xyz[0] += node->stack_xyz[0];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
59 if ((int)node->xyz[0] > screen_w || (int)node->xyz[0] < 0) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
60 node->stack_xyz[0] = -node->stack_xyz[0];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
61 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
62 //node->xyz[1] = screen_h/2;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
63 node->xyz[1] += node->stack_xyz[1];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
64 if ((int)node->xyz[1] > screen_h || (int)node->xyz[1] < 0) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
65 node->stack_xyz[1] = -node->stack_xyz[1];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
66 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
67
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
68 node->xyz[2] = 1000;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
69 //node->xyz[2] += node->stack_xyz[2];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
70 //if ((int)node->xyz[2] > screen_h || (int)node->xyz[2] < 100) {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
71 //node->stack_xyz[2] = -node->stack_xyz[2];
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
72 //}
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
73
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
74 }
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
75
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
76 void
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
77 untitled_init(void)
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
78 {
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
79 SceneGraphPtr test00;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
80 SceneGraphPtr test01;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
81 SceneGraphPtr test02;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
82 SceneGraphPtr test03;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
83 SceneGraphPtr test04;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
84 SceneGraphPtr test05;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
85 SceneGraphPtr test06;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
86 SceneGraphPtr test07;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
87 SceneGraphPtr test08;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
88 SceneGraphPtr test09;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
89
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
90 sgroot->createFromXMLfile("xml_file/Venus.xml");
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
91
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
92 // SGList.h にある SceneGraph ID から SceneGraph を生成する
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
93 /*
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
94 test00 = sgroot->createSceneGraph(cubetest000);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
95 test01 = sgroot->createSceneGraph(cubetest009);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
96 test02 = sgroot->createSceneGraph(cubetest008);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
97 test03 = sgroot->createSceneGraph(cubetest007);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
98 test04 = sgroot->createSceneGraph(cubetest006);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
99 test05 = sgroot->createSceneGraph(cubetest005);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
100 test06 = sgroot->createSceneGraph(cubetest004);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
101 test07 = sgroot->createSceneGraph(cubetest003);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
102 test08 = sgroot->createSceneGraph(cubetest002);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
103 test09 = sgroot->createSceneGraph(cubetest001);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
104 */
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
105 test00 = sgroot->createSceneGraph(Venus000);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
106 test01 = sgroot->createSceneGraph(Venus009);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
107 test02 = sgroot->createSceneGraph(Venus008);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
108 test03 = sgroot->createSceneGraph(Venus007);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
109 test04 = sgroot->createSceneGraph(Venus006);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
110 test05 = sgroot->createSceneGraph(Venus005);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
111 test06 = sgroot->createSceneGraph(Venus004);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
112 test07 = sgroot->createSceneGraph(Venus003);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
113 test08 = sgroot->createSceneGraph(Venus002);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
114 test09 = sgroot->createSceneGraph(Venus001);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
115
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
116 // SceneGraph の move と collision を設定
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
117 test00->set_move_collision(cubetest_move, cubetest_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
118 test00->stack_xyz[0] = 3.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
119 test00->stack_xyz[1] = 3.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
120 test00->stack_xyz[2] = 3.0f;
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
121
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
122
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
123
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
124 test01->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
125 test02->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
126 test03->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
127 test04->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
128 test05->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
129 test06->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
130 test07->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
131 test08->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
132 test09->set_move_collision(test_move, test_collision);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
133
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
134 // SceneGraph 同士の親子関係を設定 (今回は 親 test00、子 その他)
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
135 test00->addChild(test01);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
136 test00->addChild(test02);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
137 test00->addChild(test03);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
138 test00->addChild(test04);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
139 test00->addChild(test05);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
140 test00->addChild(test06);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
141 test00->addChild(test07);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
142 test00->addChild(test08);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
143 test00->addChild(test09);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
144
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
145 // SceneGraphRoot に、使用する SceneGraph を設定する
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
146 // このとき、ユーザーが記述した SceneGraph の root を渡す。
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
147 sgroot->setSceneData(test00);
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
148
5ae15a5d3dc5 test program add (-sg 12)
tkaito@nw0534.st.ie.u-ryukyu.ac.jp
parents:
diff changeset
149 }