comparison Renderer/Test/untitled.cc @ 563:338ad9c856fc draft

all exmple on Mac OS X
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 22 Oct 2009 23:05:16 +0900
parents 764772be1e3c
children e112f38275d5
comparison
equal deleted inserted replaced
562:d65f21b18165 563:338ad9c856fc
1 #include <stdlib.h> 1 #include <stdlib.h>
2 #include "SceneGraphRoot.h" 2 #include "SceneGraphRoot.h"
3 #include "SGList.h" 3 #include "untitled.h"
4 #include <math.h> 4 #include <math.h>
5 5
6 static void 6 static void
7 cubetest_collision(SceneGraphPtr node, int screen_w, int screen_h, 7 cubetest_collision(SceneGraphPtr node, int screen_w, int screen_h,
8 SceneGraphPtr tree) 8 SceneGraphPtr tree)
85 SceneGraphPtr test06; 85 SceneGraphPtr test06;
86 SceneGraphPtr test07; 86 SceneGraphPtr test07;
87 SceneGraphPtr test08; 87 SceneGraphPtr test08;
88 SceneGraphPtr test09; 88 SceneGraphPtr test09;
89 89
90 sgroot->createFromXMLfile(manager, "xml_file/Venus.xml"); 90 sgroot->createFromXMLfile( "xml_file/Venus.xml");
91 91
92 // SGList.h にある SceneGraph ID から SceneGraph を生成する 92 // SGList.h にある SceneGraph ID から SceneGraph を生成する
93 /* 93 /*
94 test00 = sgroot->createSceneGraph(cubetest000); 94 test00 = sgroot->createSceneGraph(cubetest000);
95 test01 = sgroot->createSceneGraph(cubetest009); 95 test01 = sgroot->createSceneGraph(cubetest009);
100 test06 = sgroot->createSceneGraph(cubetest004); 100 test06 = sgroot->createSceneGraph(cubetest004);
101 test07 = sgroot->createSceneGraph(cubetest003); 101 test07 = sgroot->createSceneGraph(cubetest003);
102 test08 = sgroot->createSceneGraph(cubetest002); 102 test08 = sgroot->createSceneGraph(cubetest002);
103 test09 = sgroot->createSceneGraph(cubetest001); 103 test09 = sgroot->createSceneGraph(cubetest001);
104 */ 104 */
105 test00 = sgroot->createSceneGraph(Venus000); 105 test00 = sgroot->createSceneGraph("Venus000");
106 test01 = sgroot->createSceneGraph(Venus009); 106 test01 = sgroot->createSceneGraph("Venus009");
107 test02 = sgroot->createSceneGraph(Venus008); 107 test02 = sgroot->createSceneGraph("Venus008");
108 test03 = sgroot->createSceneGraph(Venus007); 108 test03 = sgroot->createSceneGraph("Venus007");
109 test04 = sgroot->createSceneGraph(Venus006); 109 test04 = sgroot->createSceneGraph("Venus006");
110 test05 = sgroot->createSceneGraph(Venus005); 110 test05 = sgroot->createSceneGraph("Venus005");
111 test06 = sgroot->createSceneGraph(Venus004); 111 test06 = sgroot->createSceneGraph("Venus004");
112 test07 = sgroot->createSceneGraph(Venus003); 112 test07 = sgroot->createSceneGraph("Venus003");
113 test08 = sgroot->createSceneGraph(Venus002); 113 test08 = sgroot->createSceneGraph("Venus002");
114 test09 = sgroot->createSceneGraph(Venus001); 114 test09 = sgroot->createSceneGraph("Venus001");
115 115
116 // SceneGraph の move と collision を設定 116 // SceneGraph の move と collision を設定
117 test00->set_move_collision(cubetest_move, cubetest_collision); 117 test00->set_move_collision(cubetest_move, cubetest_collision);
118 test00->stack_xyz[0] = 3.0f; 118 test00->stack_xyz[0] = 3.0f;
119 test00->stack_xyz[1] = 3.0f; 119 test00->stack_xyz[1] = 3.0f;
148 return sgroot; 148 return sgroot;
149 } 149 }
150 150
151 extern Application * 151 extern Application *
152 application() { 152 application() {
153 return new untitiled(); 153 return new untitled();
154 } 154 }
155 155
156 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; 156 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n";
157 157
158 extern int init(TaskManager *manager, int argc, char *argv[]); 158 extern int init(TaskManager *manager, int argc, char *argv[]);