# HG changeset patch # User e095732 # Date 1327582592 -32400 # Node ID 13065ad17328261f375b38258a11acb1503565d3 # Parent 38c7e8b47c4bf8fcce79e883c7ef8cca4fa82e08 collada moved but only my mac. diff -r 38c7e8b47c4b -r 13065ad17328 Renderer/Engine/Collada.cc --- a/Renderer/Engine/Collada.cc Thu Jan 26 20:33:22 2012 +0900 +++ b/Renderer/Engine/Collada.cc Thu Jan 26 21:56:32 2012 +0900 @@ -314,7 +314,7 @@ } /* make triangle */ - int k=0,l=0; + int k=0,l=0,size=0; for (int i=0;ivmember;i++) { if (s->vcount[i] == 4) { vertex_table[k++] = s->vertex_float->u.array[vertexp[l]]; @@ -324,10 +324,12 @@ vertex_table[k++] = s->vertex_float->u.array[vertexp[l+2]]; vertex_table[k++] = s->vertex_float->u.array[vertexp[l+3]]; l+=4; + size +=2; } else if (s->vcount[i]==3) { vertex_table[k++] = s->vertex_float->u.array[vertexp[l++]]; vertex_table[k++] = s->vertex_float->u.array[vertexp[l++]]; vertex_table[k++] = s->vertex_float->u.array[vertexp[l++]]; + size++; } } @@ -336,11 +338,14 @@ * pickup_normal,pickup_coordinate,pickup_textureの処理 * vcsumは頂点の数,countは面の数 */ - int count = s->vcsum / 3; + //int count = s->vcsum / 3; + int count = size / 3; //polygonの作成 sg->pp_num = (count + MAX_SIZE_TRIANGLE - 1) / MAX_SIZE_TRIANGLE; sg->pp = new PolygonPack[sg->pp_num]; - + sg->name = s->name; + sg->parent_name = "NULL"; + sg->size = size; for (int i = 0;i < sg->pp_num; i++ ){ PolygonPackPtr pp = sg->pp; TrianglePackPtr tri = pp[i].tri;