Mercurial > hg > Members > kono > Cerium
comparison Renderer/Test/gaplant.cc @ 560:1a2f015c42b2
gaplant... how to solve scenegraph id conflict?
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 19:23:13 +0900 |
parents | ec72b601b71f |
children | a5fda4e51498 |
comparison
equal
deleted
inserted
replaced
559:ccb33e5bcf89 | 560:1a2f015c42b2 |
---|---|
1 #include "SceneGraphRoot.h" | 1 #include "SceneGraphRoot.h" |
2 #include "SGList.h" | 2 #include "xml_file/gap_plane_test.xml.h" |
3 #include "gaplant_action.h" | 3 #include "gaplant_action.h" |
4 #include "gaplant.h" | |
4 #include "back_action.h" | 5 #include "back_action.h" |
5 | 6 |
6 MainLoopPtr | 7 MainLoopPtr |
7 gaplant::init_gaplant(Viewer *sgroot, int w, int h) | 8 gaplant::init(Viewer *sgroot, int w, int h) |
8 { | 9 { |
9 SceneGraphPtr back; | 10 SceneGraphPtr back; |
10 SceneGraphPtr gaplant; | 11 SceneGraphPtr gaplant; |
11 sgroot->createFromXMLfile(manager, "xml_file/gap_plane_test.xml"); | 12 sgroot->createFromXMLfile("xml_file/gap_plane_test.xml"); |
12 sgroot->createFromXMLfile(manager, "xml_file/Ball.xml"); | 13 sgroot->createFromXMLfile("xml_file/Ball.xml"); |
13 | 14 |
14 back = sgroot->createSceneGraph(); | 15 back = sgroot->createSceneGraph(); |
15 back->set_move_collision(back_move, back_coll); | 16 back->set_move_collision(back_move, back_coll); |
16 gaplant = sgroot->createSceneGraph(); | 17 gaplant = sgroot->createSceneGraph(); |
17 gaplant->xyz[0] = 200; | 18 gaplant->xyz[0] = 200; |
27 | 28 |
28 back->addChild(gaplant); | 29 back->addChild(gaplant); |
29 sgroot->setSceneData(back); | 30 sgroot->setSceneData(back); |
30 return sgroot; | 31 return sgroot; |
31 } | 32 } |
33 | |
34 | |
35 | |
36 extern Application * | |
37 application() { | |
38 return new gaplant(); | |
39 } | |
40 | |
41 const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; | |
42 | |
43 extern int init(TaskManager *manager, int argc, char *argv[]); | |
44 extern void task_initialize(); | |
45 static void TMend(TaskManager *manager); | |
46 | |
47 int | |
48 TMmain(TaskManager *manager, int argc, char *argv[]) | |
49 { | |
50 task_initialize(); | |
51 manager->set_TMend(TMend); | |
52 return init(manager, argc, argv); | |
53 | |
54 } | |
55 | |
56 void | |
57 TMend(TaskManager *manager) | |
58 { | |
59 printf("test_nogl end\n"); | |
60 } | |
61 | |
62 /* end */ |