From 9098e820048f7d59193c90265f4c3b250af15d7b Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Fri, 7 Jan 2011 17:50:36 +0000 Subject: [PATCH] BT_USE_DOUBLE_PRECISION was missing from bullet.pc using cmake Thanks to Sigluy, see Issue 471 Default constructor for btBvhTriangleMeshShape causes NULL dereference, so removed obsolete constructor. Thanks to exarkun, see Issue 465 --- CMakeLists.txt | 1 + bullet.pc.cmake | 2 +- src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h | 2 +- .../CollisionShapes/btMultimaterialTriangleMeshShape.h | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 450cc80d0..8e70b76a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,6 +190,7 @@ ENDIF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES) IF (USE_DOUBLE_PRECISION) ADD_DEFINITIONS( -DBT_USE_DOUBLE_PRECISION) +SET( BULLET_DOUBLE_DEF "-DBT_USE_DOUBLE_PRECISION") ENDIF (USE_DOUBLE_PRECISION) IF(USE_GRAPHICAL_BENCHMARK) diff --git a/bullet.pc.cmake b/bullet.pc.cmake index 0ce91845d..c5649d58d 100644 --- a/bullet.pc.cmake +++ b/bullet.pc.cmake @@ -3,4 +3,4 @@ Description: Bullet Continuous Collision Detection and Physics Library Requires: Version: @BULLET_VERSION@ Libs: -L@LIB_DESTINATION@ -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath -Cflags: -I@INCLUDE_INSTALL_DIR@ +Cflags: @BULLET_DOUBLE_DEF@ -I@INCLUDE_INSTALL_DIR@ diff --git a/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h index e4d4386ae..c269ef27b 100644 --- a/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -39,7 +39,7 @@ public: BT_DECLARE_ALIGNED_ALLOCATOR(); - btBvhTriangleMeshShape() : btTriangleMeshShape(0),m_bvh(0),m_triangleInfoMap(0),m_ownsBvh(false) {m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;}; + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true); ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb diff --git a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h index d42ba1143..96b2ad95b 100644 --- a/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h +++ b/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h @@ -31,7 +31,6 @@ public: BT_DECLARE_ALIGNED_ALLOCATOR(); - btMultimaterialTriangleMeshShape(): btBvhTriangleMeshShape() {m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;} btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true): btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh) {