comparison Renderer/Engine/SceneGraphRoot.cc @ 1290:48a65461ed84 draft

can read float_array in collada file.
author Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
date Thu, 01 Dec 2011 23:53:32 +0900
parents 6fc9fd03a4fd
children 3fa46ff7824e
comparison
equal deleted inserted replaced
1289:6fc9fd03a4fd 1290:48a65461ed84
259 259
260 static void 260 static void
261 xml_walk( SceneGraphRoot* self, xmlNodePtr cur) 261 xml_walk( SceneGraphRoot* self, xmlNodePtr cur)
262 { 262 {
263 /*get float array.*/ 263 /*get float array.*/
264 printf("name = %s\n", cur->name); 264 printf("name = %s, child:%s\n", cur->name, cur->children);
265 if (!xmlStrcmp(cur->name, (xmlChar*)"float_array")) { 265 if (!xmlStrcmp(cur->name, (xmlChar*)"float_array")) {
266 266
267 char *cont =(char*)xmlNodeGetContent(cur); 267 char *cont =(char*)xmlNodeGetContent(cur);
268 //const char *id = get_property("id", cur); 268 //const char *id = get_property("id", cur);
269 269
271 //int count = atoi(get_property("count", cur)); 271 //int count = atoi(get_property("count", cur));
272 272
273 int count = atoi((char*)xmlGetProp(cur, (xmlChar*)"count")); 273 int count = atoi((char*)xmlGetProp(cur, (xmlChar*)"count"));
274 274
275 printf("id:%s count:%d cont:%s\n", id, count, cont); 275 printf("id:%s count:%d cont:%s\n", id, count, cont);
276
277 if (cur->children == "(null)") {
278 return;
279 }
276 280
277 } 281 }
278 for (cur=cur->children; cur; cur=cur->next){ 282 for (cur=cur->children; cur; cur=cur->next){
279 xml_walk(self, cur); 283 xml_walk(self, cur);
280 } 284 }