From 9d0f875c5b9647d0598afcbab87b85784a5041f9 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Tue, 15 Aug 2017 09:34:44 -0700 Subject: [PATCH] fix compile issues due to API change (additional argument) --- Extras/InverseDynamics/btMultiBodyFromURDF.hpp | 2 +- .../RobotSimulator/b3RobotSimulatorClientAPI.cpp | 15 +++++++++++++-- test/SharedMemory/test.c | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Extras/InverseDynamics/btMultiBodyFromURDF.hpp b/Extras/InverseDynamics/btMultiBodyFromURDF.hpp index d627ea985..f3e2a7c05 100644 --- a/Extras/InverseDynamics/btMultiBodyFromURDF.hpp +++ b/Extras/InverseDynamics/btMultiBodyFromURDF.hpp @@ -44,7 +44,7 @@ public: void init() { this->createEmptyDynamicsWorld(); m_dynamicsWorld->setGravity(m_gravity); - BulletURDFImporter urdf_importer(&m_nogfx,0); + BulletURDFImporter urdf_importer(&m_nogfx,0,1); URDFImporterInterface &u2b(urdf_importer); bool loadOk = u2b.loadURDF(m_filename.c_str(), m_base_fixed); diff --git a/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp b/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp index a0d2c376c..73c7e30e6 100644 --- a/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp +++ b/examples/RobotSimulator/b3RobotSimulatorClientAPI.cpp @@ -129,9 +129,20 @@ bool b3RobotSimulatorClientAPI::connect(int mode, const std::string& hostName, i int argc = 0; char* argv[1] = {0}; #ifdef __APPLE__ - sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc, argv); + sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc, argv,1); #else - sm = b3CreateInProcessPhysicsServerAndConnect(argc, argv); + sm = b3CreateInProcessPhysicsServerAndConnect(argc, argv,1); +#endif + break; + } + case eCONNECT_GUI_SERVER: + { + int argc = 0; + char* argv[1] = {0}; +#ifdef __APPLE__ + sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc, argv,0); +#else + sm = b3CreateInProcessPhysicsServerAndConnect(argc, argv,0); #endif break; } diff --git a/test/SharedMemory/test.c b/test/SharedMemory/test.c index e475a4705..9dec36e92 100644 --- a/test/SharedMemory/test.c +++ b/test/SharedMemory/test.c @@ -335,9 +335,9 @@ int main(int argc, char* argv[]) #ifdef PHYSICS_IN_PROCESS_EXAMPLE_BROWSER #ifdef __APPLE__ - b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc,argv); + b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc,argv,1); #else - b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnect(argc,argv); + b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnect(argc,argv,1); #endif //__APPLE__ #endif