changeset 1323:68373985b251 draft

minor change collada file reader.
author Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
date Tue, 20 Dec 2011 13:08:51 +0900
parents 2b4e3fc1c800
children 64b54c99d895 c2f9b2492a31
files Renderer/Engine/SceneGraphRoot.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraphRoot.cc	Tue Dec 20 11:24:09 2011 +0900
+++ b/Renderer/Engine/SceneGraphRoot.cc	Tue Dec 20 13:08:51 2011 +0900
@@ -454,11 +454,14 @@
         for (int i=0; vertexp[i];i++) {
             if (s->vcount[i] == 4) {
                 for (int j=0; j > s->vcount[i]; j++) {
-                    vertex_table[i] =  s->vertex_float->u.array[vertexp[i]];
-                    vertex_table[i+3] =  s->vertex_float->u.array[vertexp[i+1]];
+                    vertex_table[i] = s->vertex_float->u.array[vertexp[i]];
+                    vertex_table[i+3] = s->vertex_float->u.array[vertexp[i+1]];
                     i += 2;
                 }
             }
+            if (s->vcount[i]==3) {
+                    vertex_table[i] = s->vertex_float->u.array[vertexp[i]];
+            }
         }
         for (int i=0; vertex_table; i++) {
             printf("normal_table= %f\n", normal_table[i]);