From 1b2db1ff090504ba8bb6915a6e1cb95ef604aadc Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 23 Jan 2017 22:22:02 -0800 Subject: [PATCH] more btCapsuleShape fixes use hello_mjcf.xml for MJCF importer --- examples/Importers/ImportMJCFDemo/ImportMJCFSetup.cpp | 2 +- src/BulletCollision/CollisionShapes/btCapsuleShape.cpp | 7 ++----- src/BulletCollision/CollisionShapes/btCapsuleShape.h | 7 ++++++- src/BulletCollision/CollisionShapes/btConvexShape.cpp | 1 - 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/Importers/ImportMJCFDemo/ImportMJCFSetup.cpp b/examples/Importers/ImportMJCFDemo/ImportMJCFSetup.cpp index 75f6b83b3..79fff963f 100644 --- a/examples/Importers/ImportMJCFDemo/ImportMJCFSetup.cpp +++ b/examples/Importers/ImportMJCFDemo/ImportMJCFSetup.cpp @@ -123,7 +123,7 @@ ImportMJCFSetup::ImportMJCFSetup(struct GUIHelperInterface* helper, int option, gMCFJFileNameArray.push_back("mjcf/humanoid.xml"); gMCFJFileNameArray.push_back("mjcf/inverted_pendulum.xml"); gMCFJFileNameArray.push_back("mjcf/ant.xml"); - gMCFJFileNameArray.push_back("mjcf/hello_mjcf2.xml"); + gMCFJFileNameArray.push_back("mjcf/hello_mjcf.xml"); gMCFJFileNameArray.push_back("mjcf/capsule.xml"); // gMCFJFileNameArray.push_back("mjcf/hopper.xml"); // gMCFJFileNameArray.push_back("mjcf/swimmer.xml"); diff --git a/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp b/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp index 16dc346d8..0345501ce 100644 --- a/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp +++ b/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp @@ -16,7 +16,6 @@ subject to the following restrictions: #include "btCapsuleShape.h" -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" #include "LinearMath/btQuaternion.h" btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) : btConvexInternalShape () @@ -49,8 +48,7 @@ btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) : btConvexInter btVector3 vtx; btScalar newDot; - btScalar radius = getRadius(); - + { btVector3 pos(0,0,0); @@ -85,8 +83,7 @@ btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) : btConvexInter { - btScalar radius = getRadius(); - + for (int j=0;jgetHalfHeight(); int capsuleUpAxis = capsuleShape->getUpAxis(); - btScalar radius = capsuleShape->getRadius(); btVector3 supVec(0,0,0); btScalar maxDot(btScalar(-BT_LARGE_FLOAT));