From e579fa9488b417865778b2e66cae8240214cbce3 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 15 May 2014 15:44:22 -0700 Subject: [PATCH] fix/workaround for gcc internal compiler error See also http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=9636&hilit=compiler+error+gcc and https://github.com/bulletphysics/bullet3/issues/174 https://github.com/bulletphysics/bullet3/issues/39 --- .../CollisionDispatch/btInternalEdgeUtility.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp b/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp index 73fa4e87e..f97d11db7 100644 --- a/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp +++ b/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp @@ -114,6 +114,7 @@ struct btConnectivityProcessor : public btTriangleCallback if(numshared >= 3) return; } + switch (numshared) { case 0: @@ -202,7 +203,6 @@ struct btConnectivityProcessor : public btTriangleCallback ang4 = 0.f; } else { - calculatedEdge.normalize(); btVector3 calculatedNormalA = calculatedEdge.cross(edgeCrossA); calculatedNormalA.normalize(); @@ -213,7 +213,7 @@ struct btConnectivityProcessor : public btTriangleCallback isConvex = (dotA<0.); correctedAngle = isConvex ? ang4 : -ang4; - btQuaternion orn2(calculatedEdge,-correctedAngle); + btQuaternion orn2 = btQuaternion(btVector3(calculatedEdge.x(), calculatedEdge.y(), calculatedEdge.z()),-correctedAngle); calculatedNormalB = btMatrix3x3(orn2)*normalA; @@ -301,11 +301,6 @@ struct btConnectivityProcessor : public btTriangleCallback break; } - default: - { - // printf("warning: duplicate triangle\n"); - } - } } };