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; } 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);