From 36c258fd3dab1b49c5d7fd9b8f7a4546f6947b88 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Wed, 3 Jan 2018 21:38:09 -0800 Subject: [PATCH 1/2] fix PhysicsLoopBack --- examples/SharedMemory/PhysicsLoopBack.cpp | 6 ++++++ examples/SharedMemory/PhysicsLoopBack.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/examples/SharedMemory/PhysicsLoopBack.cpp b/examples/SharedMemory/PhysicsLoopBack.cpp index e9880da7f..0606588e6 100644 --- a/examples/SharedMemory/PhysicsLoopBack.cpp +++ b/examples/SharedMemory/PhysicsLoopBack.cpp @@ -180,6 +180,12 @@ void PhysicsLoopBack::getCachedVisualShapeInformation(struct b3VisualShapeInform return m_data->m_physicsClient->getCachedVisualShapeInformation(visualShapesInfo); } +void PhysicsLoopBack::getCachedCollisionShapeInformation(struct b3CollisionShapeInformation* collisionShapesInfo) +{ + return m_data->m_physicsClient->getCachedCollisionShapeInformation(collisionShapesInfo); +} + + void PhysicsLoopBack::getCachedVREvents(struct b3VREventsData* vrEventsData) { return m_data->m_physicsClient->getCachedVREvents(vrEventsData); diff --git a/examples/SharedMemory/PhysicsLoopBack.h b/examples/SharedMemory/PhysicsLoopBack.h index 44d54a40e..f4591ed99 100644 --- a/examples/SharedMemory/PhysicsLoopBack.h +++ b/examples/SharedMemory/PhysicsLoopBack.h @@ -72,6 +72,8 @@ public: virtual void getCachedVisualShapeInformation(struct b3VisualShapeInformation* visualShapesInfo); + virtual void getCachedCollisionShapeInformation(struct b3CollisionShapeInformation* collisionShapesInfo); + virtual void getCachedVREvents(struct b3VREventsData* vrEventsData); virtual void getCachedKeyboardEvents(struct b3KeyboardEventsData* keyboardEventsData); From 4743d2770a42af65f337501dac4383574a322536 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Wed, 3 Jan 2018 21:47:58 -0800 Subject: [PATCH 2/2] fix recently introduced crashing bug in MJCF reader due to https://github.com/bulletphysics/bullet3/pull/1484 (Issue 1484) --- examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp index 3c2a87322..a26b37ab3 100644 --- a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp +++ b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp @@ -251,7 +251,7 @@ struct BulletMJCFImporterInternalData const char* angle = root_xml->Attribute("angle"); m_angleUnits = angle ? angle : "degree"; // degrees by default, http://www.mujoco.org/book/modeling.html#compiler const char* inertiaFromGeom = root_xml->Attribute("inertiafromgeom"); - if(inertiaFromGeom[0] == 'f') // false, other values assumed `true`. + if(inertiaFromGeom && inertiaFromGeom[0] == 'f') // false, other values assumed `true`. { m_inertiaFromGeom = false; }