Mercurial > hg > Game > Cerium
comparison Renderer/Engine/SceneGraphRoot.cc @ 1251:6da91e7cbffb draft
improve create From COLLADA
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 Nov 2011 18:17:26 +0900 |
parents | fd9b7519a17b |
children | bb9c885c1cb5 34944900f266 |
comparison
equal
deleted
inserted
replaced
1250:c41f10c1e138 | 1251:6da91e7cbffb |
---|---|
224 } | 224 } |
225 xmlFreeDoc(doc); | 225 xmlFreeDoc(doc); |
226 } | 226 } |
227 | 227 |
228 void | 228 void |
229 SceneGraphRoot::createFromCOLLADAfile(Taskmanager *manager, const char *xmlColladafile) | 229 SceneGraphRoot::createFromCOLLADAfile(TaskManager *manager, const char *xmlColladafile) |
230 { | 230 { |
231 /*make parse dom*/ | 231 /*make parse dom*/ |
232 xmlDocPtr doc; | 232 xmlDocPtr doc; |
233 xmlNodePtr cur; | 233 xmlNodePtr cur; |
234 SceneGraphPtr tmp; | 234 SceneGraphPtr tmp; |
235 | 235 |
236 doc = xmlParseFile(xmlColladafile); | 236 doc = xmlParseFile(xmlColladafile); |
237 cur = xmlDocGetRootElement(doc); | 237 cur = xmlDocGetRootElement(doc); |
238 | 238 |
239 /*エラー処理……だけど何書けばいいのか謎。とりあえず-1返してみる*/ | 239 /*エラー処理……だけど何書けばいいのか謎。とりあえず-1返してみる*/ |
240 if(xmlStrcmp(cur-name, (xmlChar*)"COLLADA")){ | 240 if(xmlStrcmp(cur->name, (xmlChar*)"COLLADA")){ |
241 return -1; | 241 return ; |
242 }; | 242 }; |
243 | 243 |
244 /* node analyze */ | 244 /* node analyze */ |
245 for(cur=cur->children; cur; cur=cur->next){ | 245 for(cur=cur->children; cur; cur=cur->next){ |
246 | 246 |