Mercurial > hg > Game > Cerium
comparison Renderer/Engine/SceneGraphRoot.cc @ 1308:78248082c56d draft
reading COLLADA file minor change.
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 15 Dec 2011 14:28:21 +0900 |
parents | 5b1589ce972e |
children | 857d3feaeb75 |
comparison
equal
deleted
inserted
replaced
1307:5b1589ce972e | 1308:78248082c56d |
---|---|
363 char *normal_id = (char*)xmlGetProp(cur, (xmlChar*)"id"); | 363 char *normal_id = (char*)xmlGetProp(cur, (xmlChar*)"id"); |
364 int *normal_offset = atoi((char*)xmlGetProp(cur, (xmlChar*)"offset")); | 364 int *normal_offset = atoi((char*)xmlGetProp(cur, (xmlChar*)"offset")); |
365 } | 365 } |
366 */ | 366 */ |
367 | 367 |
368 get_point( , , ); | |
369 | |
370 } | 368 } |
371 | 369 |
372 if (!xmlStrcmp(cur->name, (xmlChar*)"float_array")) { | 370 if (!xmlStrcmp(cur->name, (xmlChar*)"float_array")) { |
373 | 371 |
374 SOURCE_P src = (SOURCE_P)malloc(sizeof(SOURCE)); | 372 SOURCE_P src = (SOURCE_P)malloc(sizeof(SOURCE)); |
402 char *pid = (char*)xmlGetProp(cur, (xmlChar*)"id"); | 400 char *pid = (char*)xmlGetProp(cur, (xmlChar*)"id"); |
403 float *vcount = malloc(sizeof(int)*count); | 401 float *vcount = malloc(sizeof(int)*count); |
404 float *pcount = malloc(sizeof(float)*sum); | 402 float *pcount = malloc(sizeof(float)*sum); |
405 | 403 |
406 if (!xmlStrcmp(cur->name, (xmlChar*)"vcount")) { | 404 if (!xmlStrcmp(cur->name, (xmlChar*)"vcount")) { |
407 char *vcount_cont = (char*)xmlNodeGetContent(cur); | 405 char *vcont = (char*)xmlNodeGetContent(cur); |
408 for (int i=0; vcount!=NULL; i++) { | 406 for (int i=0; vcount!=NULL; i++) { |
409 vcount = pickup_float(vcount, p+i); | 407 vcont = pickup_float(vcont, vcount+i); |
410 } | 408 } |
411 } | 409 } |
412 | 410 |
413 if (!xmlStrcmp(cur->name, (xmlChar*)"p")) { | 411 if (!xmlStrcmp(cur->name, (xmlChar*)"p")) { |
414 char *pcont = (char*)xmlNodeGetContent(cur); | 412 char *pcont = (char*)xmlNodeGetContent(cur); |
415 for (int i=0; pcont != NULL; i++) { | 413 for (int i=0; pcont != NULL; i++) { |
416 pcount = pickup_float(pcont, p+i); | 414 pcont = pickup_float(pcont, pcount+i); |
417 } | 415 } |
418 } | 416 } |
419 } | 417 } |
418 | |
419 get_point(pid, , cur); | |
420 | |
420 | 421 |
421 for (SOURCE *iliner = list->first; list->end != iliner; iliner = iliner->next) { | 422 for (SOURCE *iliner = list->first; list->end != iliner; iliner = iliner->next) { |
422 if (!strcmp_a(pid, iliner->id)) { | 423 if (!strcmp_a(pid, iliner->id)) { |
423 if (vcount == 4) { | 424 if (vcount == 4) { |
424 | 425 |