From 994224c94ffb813b644fc86010d9c8228ae6a7f6 Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Mon, 19 Jan 2009 07:19:24 +0000 Subject: [PATCH] fix another bug caused by error-prone btCollisionShape 'getShapeType' refactoring. Thanks a lot to Alex Silverman for the report and fix: http://code.google.com/p/bullet/issues/detail?id=170 --- .../btMultimaterialTriangleMeshShape.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h index e0b71b737..86dd81a01 100644 --- a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h @@ -31,10 +31,12 @@ public: BT_DECLARE_ALIGNED_ALLOCATOR(); - btMultimaterialTriangleMeshShape(): btBvhTriangleMeshShape() {} + btMultimaterialTriangleMeshShape(): btBvhTriangleMeshShape() {m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;} btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true): btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh) { + m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE; + btVector3 m_triangle[3]; const unsigned char *vertexbase; int numverts; @@ -67,6 +69,8 @@ public: btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax, bool buildBvh = true): btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh) { + m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE; + btVector3 m_triangle[3]; const unsigned char *vertexbase; int numverts; @@ -107,11 +111,6 @@ public: m_materialLookup = NULL; */ } - virtual int getShapeType() const - { - return MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE; - } - //debugging virtual const char* getName()const {return "MULTIMATERIALTRIANGLEMESH";}