Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/test_render/SceneGraphRoot.cc @ 544:519a1bba9b05
merge
author | aaa |
---|---|
date | Wed, 21 Oct 2009 21:05:34 +0900 |
parents | 9f9d51b60062 4bd51a6f6d08 |
children | e40b32f0f71e |
comparison
equal
deleted
inserted
replaced
543:9f9d51b60062 | 544:519a1bba9b05 |
---|---|
4 #include "SceneGraphRoot.h" | 4 #include "SceneGraphRoot.h" |
5 #include "xml.h" | 5 #include "xml.h" |
6 #include "sys.h" | 6 #include "sys.h" |
7 #include "TextureHash.h" | 7 #include "TextureHash.h" |
8 #include "texture.h" | 8 #include "texture.h" |
9 #include "SGList.h" | 9 //#include "SGList.h" |
10 #include "Application.h" | 10 #include "Application.h" |
11 | 11 |
12 int cnt = 0; | 12 int cnt = 0; |
13 static const int SGLIST_LENGTH = 138; | |
13 | 14 |
14 SceneGraphRoot::SceneGraphRoot(float w, float h) | 15 SceneGraphRoot::SceneGraphRoot(float w, float h) |
15 { | 16 { |
16 // SGLIST_LENGTH 決め打ちかぁ、動的生成にする場合上限決めておいた方がいいのかな | 17 // SGLIST_LENGTH 決め打ちかぁ、動的生成にする場合上限決めておいた方がいいのかな |
18 // | |
17 sg_src = new SceneGraphPtr[SGLIST_LENGTH]; | 19 sg_src = new SceneGraphPtr[SGLIST_LENGTH]; |
18 camera = new Camera(w, h); | 20 camera = new Camera(w, h); |
19 iterator = new SceneGraphIterator; | 21 iterator = new SceneGraphIterator; |
20 sglist = new SceneGraphList; | 22 sglist = new SceneGraphList; |
21 controller = create_controller(); | 23 controller = create_controller(); |
63 * @param sg SceneGraph created by xmlfile | 65 * @param sg SceneGraph created by xmlfile |
64 */ | 66 */ |
65 void | 67 void |
66 SceneGraphRoot::registSceneGraph(SceneGraphPtr sg) | 68 SceneGraphRoot::registSceneGraph(SceneGraphPtr sg) |
67 { | 69 { |
70 #if 0 | |
68 for (int i = 0; i < SGLIST_LENGTH; i++) { | 71 for (int i = 0; i < SGLIST_LENGTH; i++) { |
69 if (strcmp(sg->name, sglist_table[i]) == 0) { | 72 if (strcmp(sg->name, sglist_table[i]) == 0) { |
70 sg->sgid = i; | 73 sg->sgid = i; |
71 sg_src[i] = sg; | 74 sg_src[i] = sg; |
72 return; | 75 return; |
73 } | 76 } |
74 } | 77 } |
75 | 78 |
76 fprintf(stderr, "error: (%s:%3d) Can't find Scene \"%s\"\n", | 79 fprintf(stderr, "error: (%s:%3d) Can't find Scene \"%s\"\n", |
77 __FUNCTION__, __LINE__, sg->name); | 80 __FUNCTION__, __LINE__, sg->name); |
81 #endif | |
78 } | 82 } |
79 | 83 |
80 void | 84 void |
81 SceneGraphRoot::addNext(SceneGraphPtr sg) | 85 SceneGraphRoot::addNext(SceneGraphPtr sg) |
82 { | 86 { |
179 xmlDocPtr doc; | 183 xmlDocPtr doc; |
180 xmlNodePtr cur; | 184 xmlNodePtr cur; |
181 SceneGraphPtr tmp; | 185 SceneGraphPtr tmp; |
182 | 186 |
183 // size は取れるはず、テスト用に mmap したデータを使う | 187 // size は取れるはず、テスト用に mmap したデータを使う |
188 <<<<<<< local | |
189 //int size = 10; | |
190 ======= | |
191 >>>>>>> other | |
184 /* パース DOM生成 */ | 192 /* パース DOM生成 */ |
185 //doc = xmlParseFile(xmlfile); | 193 //doc = xmlParseFile(xmlfile); |
186 //int size = (int)mmap_t.size; | 194 //int size = (int)mmap_t.size; |
187 //char *xmldata = (char *)mmap_t.file_mmap; | 195 //char *xmldata = (char *)mmap_t.file_mmap; |
188 //doc = xmlParseMemory(xmldata, size); | 196 //doc = xmlParseMemory(xmldata, size); |