Mercurial > hg > Game > Cerium
diff Renderer/Engine/Collada.cc @ 1384:207e0ed76cf1 draft
minor changes.
author | e095732 <e095732@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 27 Jan 2012 02:10:52 +0900 |
parents | de990f3e0a21 |
children | 2247b81dd68f |
line wrap: on
line diff
--- a/Renderer/Engine/Collada.cc Fri Jan 27 02:03:57 2012 +0900 +++ b/Renderer/Engine/Collada.cc Fri Jan 27 02:10:52 2012 +0900 @@ -239,9 +239,7 @@ src->count = atoi((char*)xmlGetProp(cur, (xmlChar*)"count")); src->u.array = new float[src->count]; char *cont =(char*)xmlNodeGetContent(cur); - //const char *id = get_property("id", cur); - //int count = atoi(get_property("count", cur)); - + /* store float inpoint list */ for (int i = 0; cont != NULL; i++) { cont = pickup_float(cont, src->u.array+i); @@ -338,7 +336,7 @@ * pickup_normal,pickup_coordinate,pickup_textureの処理 * vcsumは頂点の数,countは面の数 */ - //int count = s->vcsum / 3; + int count = size / 3; //polygonの作成 sg->pp_num = (count + MAX_SIZE_TRIANGLE - 1) / MAX_SIZE_TRIANGLE; @@ -354,7 +352,8 @@ pp[i].info.size = tri_size; /* default texture peste */ if (s->images_flag==0) { - get_texture_image("../Test/xml_file/blend/images/ball.jpg", sg, (xmlNodePtr)NULL, manager); + char *default_image = "../Test/xml_file/blend/images/ball.jpg"; + get_texture_image(default_image, sg, (xmlNodePtr)NULL, manager); } int k = 0; int m = 0; @@ -397,10 +396,7 @@ } sg->c_xyz[0] = sg->c_xyz[1] = sg->c_xyz[2] = 0; - - //int tex_id = 0; - //sgid_hash.sg_hash_regist(s->name, tex_id); - + delete []vertexp; delete []vertex_table; delete []normal_table; @@ -415,8 +411,6 @@ xml_walk(xmlNodePtr cur, struct collada_state *s, LIST_P list,SceneGraphPtr sg, SceneGraphRoot *root) { int in_polylist=0; - //printf("name = %s, child:%s\n", (char *)cur->name, (char *)cur->children); - //printf("s->polylist = %d\n",s->polylist); if (!xmlStrcmp(cur->name, (xmlChar*)"polylist")) { s->polylist_count = atoi((char*)xmlGetProp(cur, (xmlChar*)"count")); s->polylist=1; @@ -429,7 +423,6 @@ } else if (s->library_images && !xmlStrcmp(cur->name, (xmlChar*)"init_from")) { s->tex_picname = (char*)xmlGetProp(cur, (xmlChar*)"init_from"); get_texture_image(s->tex_picname, sg, cur , root->tmanager); - printf("------------------%s",s->tex_picname); s->library_images=0; s->images_flag=1; } else if (!s->polylist && !xmlStrcmp(cur->name, (xmlChar*)"input")) { @@ -483,8 +476,6 @@ /*make parse dom*/ xmlDocPtr doc; xmlNodePtr cur; - //,cur_images,cur_effects,cur_geometries,cur_visual_scenes; - //SceneGraphPtr tmp; doc = xmlParseFile(xmlColladafile); cur = xmlDocGetRootElement(doc);