[Jderobot-admin] jderobot-r931 - trunk/src/libs/geometry/collada

ahcorde en jderobot.org ahcorde en jderobot.org
Mar Jun 11 08:53:57 CEST 2013


Author: ahcorde
Date: 2013-06-11 08:52:57 +0200 (Tue, 11 Jun 2013)
New Revision: 931

Modified:
   trunk/src/libs/geometry/collada/colladaparser.cpp
Log:
[ahcorde] Corregido bug sobre normales


Modified: trunk/src/libs/geometry/collada/colladaparser.cpp
===================================================================
--- trunk/src/libs/geometry/collada/colladaparser.cpp	2013-06-05 16:10:12 UTC (rev 930)
+++ trunk/src/libs/geometry/collada/colladaparser.cpp	2013-06-11 06:52:57 UTC (rev 931)
@@ -133,7 +133,10 @@
 
                 math::Vector3 v= submalla->getVertex(indice);
                 math::Vector3 normals= submalla->getNormal(indice);
-                glNormal3f(normals.vector(0), normals.vector(1), normals.vector(2));
+                if(submalla->getNormalCount()>0){
+                    math::Vector3 normals= submalla->getNormal(indice);
+                    glNormal3f(normals.vector(0), normals.vector(1), normals.vector(2));
+                }
 
                 if(submalla->getTexCoordCount()>0){
                     math::Vector2d text= submalla->getTexCoord(indice);



More information about the Jderobot-admin mailing list