From 24593ed11ae77844fc0159b2a1b5bd9db6264d40 Mon Sep 17 00:00:00 2001 From: erwin coumans Date: Wed, 19 Oct 2016 16:21:33 -0700 Subject: [PATCH 1/2] fix r2d2.urdf and avoid self-penetrating limbs --- data/r2d2.urdf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/r2d2.urdf b/data/r2d2.urdf index 1d28b9a47..36a643f3d 100644 --- a/data/r2d2.urdf +++ b/data/r2d2.urdf @@ -11,7 +11,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -317,7 +317,7 @@ - + @@ -368,13 +368,13 @@ - + - + @@ -412,7 +412,7 @@ - + From 0ca1cee6f0bfa73b1252f2f232deeca35dbaceee Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 20 Oct 2016 14:08:55 -0700 Subject: [PATCH 2/2] add a few virtual destructors, remove physics client from server --- examples/CommonInterfaces/CommonCameraInterface.h | 1 + examples/CommonInterfaces/CommonRenderInterface.h | 1 + examples/SharedMemory/main.cpp | 14 ++++---------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/examples/CommonInterfaces/CommonCameraInterface.h b/examples/CommonInterfaces/CommonCameraInterface.h index 1e9fa2f25..813aa4344 100644 --- a/examples/CommonInterfaces/CommonCameraInterface.h +++ b/examples/CommonInterfaces/CommonCameraInterface.h @@ -3,6 +3,7 @@ struct CommonCameraInterface { + virtual ~CommonCameraInterface(){} virtual void getCameraProjectionMatrix(float m[16])const = 0; virtual void getCameraViewMatrix(float m[16]) const = 0; diff --git a/examples/CommonInterfaces/CommonRenderInterface.h b/examples/CommonInterfaces/CommonRenderInterface.h index 888607dd9..0800b9b9d 100644 --- a/examples/CommonInterfaces/CommonRenderInterface.h +++ b/examples/CommonInterfaces/CommonRenderInterface.h @@ -19,6 +19,7 @@ enum struct CommonRenderInterface { + virtual ~CommonRenderInterface() {} virtual void init()=0; virtual void updateCamera(int upAxis)=0; virtual void removeAllInstances() = 0; diff --git a/examples/SharedMemory/main.cpp b/examples/SharedMemory/main.cpp index fa83a488d..5eabfff57 100644 --- a/examples/SharedMemory/main.cpp +++ b/examples/SharedMemory/main.cpp @@ -15,7 +15,7 @@ subject to the following restrictions: #include "PhysicsServerExample.h" -#include "PhysicsClientExample.h" + #include "Bullet3Common/b3CommandLineArgs.h" #include "../CommonInterfaces/CommonExampleInterface.h" @@ -73,16 +73,10 @@ int main(int argc, char* argv[]) args.GetCmdLineArgument("shared_memory_key", gSharedMemoryKey); - if (args.CheckCmdLineFlag("client")) - { - example = (SharedMemoryCommon*)PhysicsClientCreateFunc(options); - }else - { -// options.m_option |= PHYSICS_SERVER_ENABLE_COMMAND_LOGGING; - // options.m_option |= PHYSICS_SERVER_REPLAY_FROM_COMMAND_LOG; +// options.m_option |= PHYSICS_SERVER_ENABLE_COMMAND_LOGGING; +// options.m_option |= PHYSICS_SERVER_REPLAY_FROM_COMMAND_LOG; - example = (SharedMemoryCommon*)PhysicsServerCreateFunc(options); - } + example = (SharedMemoryCommon*)PhysicsServerCreateFunc(options); example->initPhysics();