Add Extras/BulletRobotics, will be installed as 'Extra Libs' using CMake

Reduce size of command-logfile (used in PhysicsServer (Logging) and PhysicsServer (Log Replay))
Make Bullet3Common and BulletInverseDynamics part of core Bullet libraries (not optional)
This commit is contained in:
Erwin Coumans
2017-09-06 13:18:39 -07:00
parent adafcce830
commit 7878f7ace9
8 changed files with 439 additions and 34 deletions

View File

@@ -392,7 +392,6 @@ IF(BUILD_EXTRAS)
ENDIF(BUILD_EXTRAS) ENDIF(BUILD_EXTRAS)
#Maya Dynamica plugin is moved to http://dynamica.googlecode.com
SUBDIRS(src) SUBDIRS(src)
@@ -425,7 +424,7 @@ ENDIF(INSTALL_LIBS)
#INSTALL of other files requires CMake 2.6 #INSTALL of other files requires CMake 2.6
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
OPTION(INSTALL_EXTRA_LIBS "Set when you want extra libraries installed" OFF) OPTION(INSTALL_EXTRA_LIBS "Set when you want extra libraries installed" ON)
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
OPTION(BUILD_UNIT_TESTS "Build Unit Tests" ON) OPTION(BUILD_UNIT_TESTS "Build Unit Tests" ON)
@@ -437,9 +436,8 @@ ENDIF()
set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet ) set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet )
list (APPEND BULLET_LIBRARIES LinearMath) list (APPEND BULLET_LIBRARIES LinearMath)
IF(BUILD_BULLET3) list (APPEND BULLET_LIBRARIES Bullet3Common)
list (APPEND BULLET_LIBRARIES BulletInverseDynamics) list (APPEND BULLET_LIBRARIES BulletInverseDynamics)
ENDIF(BUILD_BULLET3)
list (APPEND BULLET_LIBRARIES BulletCollision) list (APPEND BULLET_LIBRARIES BulletCollision)
list (APPEND BULLET_LIBRARIES BulletDynamics) list (APPEND BULLET_LIBRARIES BulletDynamics)
list (APPEND BULLET_LIBRARIES BulletSoftBody) list (APPEND BULLET_LIBRARIES BulletSoftBody)

View File

@@ -0,0 +1,188 @@
INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src
${BULLET_PHYSICS_SOURCE_DIR}/examples
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src
)
SET(BulletRobotics_SRCS
../../examples/SharedMemory/IKTrajectoryHelper.cpp
../../examples/SharedMemory/IKTrajectoryHelper.h
../../examples/SharedMemory/TinyRendererVisualShapeConverter.cpp
../../examples/SharedMemory/TinyRendererVisualShapeConverter.h
../../examples/OpenGLWindow/SimpleCamera.cpp
../../examples/OpenGLWindow/SimpleCamera.h
../../examples/TinyRenderer/geometry.cpp
../../examples/TinyRenderer/model.cpp
../../examples/TinyRenderer/tgaimage.cpp
../../examples/TinyRenderer/our_gl.cpp
../../examples/TinyRenderer/TinyRenderer.cpp
../../examples/SharedMemory/InProcessMemory.cpp
../../examples/SharedMemory/PhysicsClient.cpp
../../examples/SharedMemory/PhysicsClient.h
../../examples/SharedMemory/PhysicsServer.cpp
../../examples/SharedMemory/PhysicsServer.h
../../examples/SharedMemory/PhysicsServerSharedMemory.cpp
../../examples/SharedMemory/PhysicsServerSharedMemory.h
../../examples/SharedMemory/PhysicsDirect.cpp
../../examples/SharedMemory/PhysicsDirect.h
../../examples/SharedMemory/PhysicsDirectC_API.cpp
../../examples/SharedMemory/PhysicsDirectC_API.h
../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp
../../examples/SharedMemory/PhysicsServerCommandProcessor.h
../../examples/SharedMemory/PhysicsClientSharedMemory.cpp
../../examples/SharedMemory/PhysicsClientSharedMemory.h
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h
../../examples/SharedMemory/PhysicsClientC_API.cpp
../../examples/SharedMemory/PhysicsClientC_API.h
../../examples/SharedMemory/SharedMemoryPublic.h
../../examples/SharedMemory/Win32SharedMemory.cpp
../../examples/SharedMemory/Win32SharedMemory.h
../../examples/SharedMemory/PosixSharedMemory.cpp
../../examples/SharedMemory/PosixSharedMemory.h
../../examples/Utils/b3ResourcePath.cpp
../../examples/Utils/b3ResourcePath.h
../../examples/Utils/RobotLoggingUtil.cpp
../../examples/Utils/RobotLoggingUtil.h
../../examples/Utils/b3Clock.cpp
../../examples/Utils/b3ResourcePath.cpp
../../examples/Utils/b3ERPCFMHelper.hpp
../../examples/Utils/b3ReferenceFrameHelper.hpp
../../examples/Utils/ChromeTraceUtil.cpp
../../examples/ThirdPartyLibs/tinyxml/tinystr.cpp
../../examples/ThirdPartyLibs/tinyxml/tinyxml.cpp
../../examples/ThirdPartyLibs/tinyxml/tinyxmlerror.cpp
../../examples/ThirdPartyLibs/tinyxml/tinyxmlparser.cpp
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h
../../examples/ThirdPartyLibs/stb_image/stb_image.cpp
../../examples/ThirdPartyLibs/BussIK/Jacobian.cpp
../../examples/ThirdPartyLibs/BussIK/LinearR2.cpp
../../examples/ThirdPartyLibs/BussIK/LinearR3.cpp
../../examples/ThirdPartyLibs/BussIK/LinearR4.cpp
../../examples/ThirdPartyLibs/BussIK/MatrixRmn.cpp
../../examples/ThirdPartyLibs/BussIK/Misc.cpp
../../examples/ThirdPartyLibs/BussIK/Node.cpp
../../examples/ThirdPartyLibs/BussIK/Tree.cpp
../../examples/ThirdPartyLibs/BussIK/VectorRn.cpp
../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp
../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp
../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp
../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp
../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp
../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp
../../examples/Importers/ImportURDFDemo/UrdfParser.cpp
../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp
../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp
../../examples/MultiThreading/b3PosixThreadSupport.cpp
../../examples/MultiThreading/b3Win32ThreadSupport.cpp
../../examples/MultiThreading/b3ThreadSupportInterface.cpp
)
IF(BUILD_CLSOCKET)
ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET)
ENDIF(BUILD_CLSOCKET)
IF(WIN32)
LINK_LIBRARIES(
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
IF(BUILD_ENET)
ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET)
ENDIF(BUILD_ENET)
IF(BUILD_CLSOCKET)
ADD_DEFINITIONS(-DWIN32)
ENDIF(BUILD_CLSOCKET)
ELSE(WIN32)
IF(BUILD_ENET)
ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET)
ENDIF(BUILD_ENET)
IF(BUILD_CLSOCKET)
ADD_DEFINITIONS(${OSDEF})
ENDIF(BUILD_CLSOCKET)
ENDIF(WIN32)
IF(BUILD_ENET)
set(BulletRobotics_SRCS ${BulletRobotics_SRCS}
../../examples/SharedMemory/PhysicsClientUDP.cpp
../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp
../../examples/SharedMemory/PhysicsClientUDP.h
../../examples/SharedMemory/PhysicsClientUDP_C_API.h
../../examples/ThirdPartyLibs/enet/win32.c
../../examples/ThirdPartyLibs/enet/unix.c
../../examples/ThirdPartyLibs/enet/callbacks.c
../../examples/ThirdPartyLibs/enet/compress.c
../../examples/ThirdPartyLibs/enet/host.c
../../examples/ThirdPartyLibs/enet/list.c
../../examples/ThirdPartyLibs/enet/packet.c
../../examples/ThirdPartyLibs/enet/peer.c
../../examples/ThirdPartyLibs/enet/protocol.c
)
ENDIF(BUILD_ENET)
IF(BUILD_CLSOCKET)
set(BulletRobotics_SRCS ${BulletRobotics_SRCS}
../../examples/SharedMemory/PhysicsClientTCP.cpp
../../examples/SharedMemory/PhysicsClientTCP.h
../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp
../../examples/SharedMemory/PhysicsClientTCP_C_API.h
../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp
../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp
../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp
)
ENDIF()
ADD_DEFINITIONS(-DPHYSICS_SERVER_DIRECT)
ADD_LIBRARY(BulletRobotics ${BulletRobotics_SRCS})
SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES VERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES SOVERSION ${BULLET_VERSION})
IF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common)
ENDIF (BUILD_SHARED_LIBS)
IF (INSTALL_EXTRA_LIBS)
INSTALL(FILES
../../examples/SharedMemory/PhysicsClientC_API.h
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h
../../examples/SharedMemory/PhysicsClientSharedMemory2_C_API.h
../../examples/SharedMemory/PhysicsDirectC_API.h
../../examples/SharedMemory/PhysicsClientUDP_C_API.h
../../examples/SharedMemory/PhysicsClientTCP_C_API.h
../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.h
../../examples/SharedMemory/SharedMemoryPublic.h
DESTINATION include/bullet
)
INSTALL(TARGETS
BulletRobotics
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES FRAMEWORK true)
SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES PUBLIC_HEADER "PhysicsClientC_API.h" )
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
ENDIF (INSTALL_EXTRA_LIBS)

View File

@@ -1,8 +1,6 @@
SUBDIRS( obj2sdf Serialize ConvexDecomposition HACD GIMPACTUtils ) SUBDIRS( InverseDynamics BulletRobotics obj2sdf Serialize ConvexDecomposition HACD GIMPACTUtils )
IF(BUILD_BULLET3)
SUBDIRS( InverseDynamics)
ENDIF()
#Maya Dynamica plugin is moved to http://dynamica.googlecode.com #Maya Dynamica plugin is moved to http://dynamica.googlecode.com

View File

@@ -1,4 +1,4 @@
mkdir build_cmake mkdir build_cmake
cd build_cmake cd build_cmake
cmake -DBUILD_PYBULLET=ON -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=c:\python-3.5.2\include -DPYTHON_LIBRARY=c:\python-3.5.2\libs\python35.lib -DPYTHON_DEBUG_LIBRARY=c:\python-3.5.2\libs\python35_d.lib -G "Visual Studio 14 2015" .. cmake -DBUILD_PYBULLET=ON -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=c:\python-3.5.3.amd64\include -DPYTHON_LIBRARY=c:\python-3.5.3.amd64\libs\python35.lib -DPYTHON_DEBUG_LIBRARY=c:\python-3.5.3.amd64\libs\python35_d.lib -G "Visual Studio 14 2015 Win64" ..
start . start .

View File

@@ -324,4 +324,4 @@ IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
SET_TARGET_PROPERTIES(App_PhysicsServer_SharedMemory_VR PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") SET_TARGET_PROPERTIES(App_PhysicsServer_SharedMemory_VR PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
ENDIF(WIN32) ENDIF(WIN32 OR APPLE)

View File

@@ -15,7 +15,15 @@ B3_DECLARE_HANDLE(b3SharedMemoryStatusHandle);
#include "PhysicsClientSharedMemory_C_API.h" #include "PhysicsClientSharedMemory_C_API.h"
#include "PhysicsClientSharedMemory2_C_API.h" #include "PhysicsClientSharedMemory2_C_API.h"
#include "PhysicsDirectC_API.h" #include "PhysicsDirectC_API.h"
#ifdef BT_ENABLE_ENET
#include "PhysicsClientUDP_C_API.h" #include "PhysicsClientUDP_C_API.h"
#endif
#ifdef BT_ENABLE_CLSOCKET
#include "PhysicsClientTCP_C_API.h"
#endif
#include "SharedMemoryInProcessPhysicsC_API.h" #include "SharedMemoryInProcessPhysicsC_API.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -293,29 +293,108 @@ struct CommandLogger
void logCommand(const SharedMemoryCommand& command) void logCommand(const SharedMemoryCommand& command)
{ {
btCommandChunk chunk; if (m_file)
chunk.m_chunkCode = command.m_type; {
chunk.m_oldPtr = 0; btCommandChunk chunk;
chunk.m_dna_nr = 0; chunk.m_chunkCode = command.m_type;
chunk.m_length = sizeof(SharedMemoryCommand); chunk.m_oldPtr = 0;
chunk.m_number = 1; chunk.m_dna_nr = 0;
fwrite((const char*)&chunk,sizeof(btCommandChunk), 1,m_file); chunk.m_length = sizeof(SharedMemoryCommand);
fwrite((const char*)&command,sizeof(SharedMemoryCommand),1,m_file); chunk.m_number = 1;
fwrite((const char*)&chunk,sizeof(btCommandChunk), 1,m_file);
switch (command.m_type)
{
case CMD_LOAD_MJCF:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_mjcfArguments , sizeof(MjcfArgs),1,m_file);
break;
}
case CMD_REQUEST_BODY_INFO:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_sdfRequestInfoArgs, sizeof(SdfRequestInfoArgs),1,m_file);
break;
}
case CMD_REQUEST_VISUAL_SHAPE_INFO:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_requestVisualShapeDataArguments, sizeof(RequestVisualShapeDataArgs),1,m_file);
break;
}
case CMD_LOAD_URDF:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_urdfArguments, sizeof(UrdfArgs),1,m_file);
break;
}
case CMD_INIT_POSE:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_initPoseArgs,sizeof(InitPoseArgs),1,m_file);
break;
};
case CMD_REQUEST_ACTUAL_STATE:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_requestActualStateInformationCommandArgument,
sizeof(RequestActualStateArgs),1,m_file);
break;
};
case CMD_SEND_DESIRED_STATE:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_sendDesiredStateCommandArgument,sizeof(SendDesiredStateArgs),1,m_file);
break;
}
case CMD_SEND_PHYSICS_SIMULATION_PARAMETERS:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_physSimParamArgs, sizeof(SendPhysicsSimulationParameters), 1,m_file);
break;
}
case CMD_REQUEST_CONTACT_POINT_INFORMATION:
{
fwrite((const char*)&command.m_updateFlags,sizeof(int), 1,m_file);
fwrite((const char*)&command.m_requestContactPointArguments,sizeof(RequestContactDataArgs),1,m_file);
break;
}
case CMD_STEP_FORWARD_SIMULATION:
case CMD_RESET_SIMULATION:
case CMD_REQUEST_INTERNAL_DATA:
{
break;
};
default:
{
fwrite((const char*)&command,sizeof(SharedMemoryCommand),1,m_file);
}
};
}
} }
CommandLogger(const char* fileName) CommandLogger(const char* fileName)
{ {
m_file = fopen(fileName,"wb"); m_file = fopen(fileName,"wb");
unsigned char buf[15]; if (m_file)
buf[12] = 12; {
buf[13] = 13; unsigned char buf[15];
buf[14] = 14; buf[12] = 12;
writeHeader(buf); buf[13] = 13;
fwrite(buf,12,1,m_file); buf[14] = 14;
writeHeader(buf);
fwrite(buf,12,1,m_file);
}
} }
virtual ~CommandLogger() virtual ~CommandLogger()
{ {
fclose(m_file); if (m_file)
{
fclose(m_file);
}
} }
}; };
@@ -355,28 +434,162 @@ struct CommandLogPlayback
} }
bool processNextCommand(SharedMemoryCommand* cmd) bool processNextCommand(SharedMemoryCommand* cmd)
{ {
//for a little while, keep this flag to be able to read 'old' log files
//#define BACKWARD_COMPAT
#if BACKWARD_COMPAT
SharedMemoryCommand unused;
#endif//BACKWARD_COMPAT
bool result = false;
if (m_file) if (m_file)
{ {
size_t s = 0; size_t s = 0;
int commandType = -1;
if (m_fileIs64bit) if (m_fileIs64bit)
{ {
bCommandChunkPtr8 chunk8; bCommandChunkPtr8 chunk8;
s = fread((void*)&chunk8,sizeof(bCommandChunkPtr8),1,m_file); s = fread((void*)&chunk8,sizeof(bCommandChunkPtr8),1,m_file);
commandType = chunk8.code;
} else } else
{ {
bCommandChunkPtr4 chunk4; bCommandChunkPtr4 chunk4;
s = fread((void*)&chunk4,sizeof(bCommandChunkPtr4),1,m_file); s = fread((void*)&chunk4,sizeof(bCommandChunkPtr4),1,m_file);
commandType = chunk4.code;
} }
if (s==1) if (s==1)
{ {
s = fread(cmd,sizeof(SharedMemoryCommand),1,m_file); memset(cmd,0,sizeof(SharedMemoryCommand));
return (s==1); cmd->m_type = commandType;
#ifdef BACKWARD_COMPAT
s = fread(&unused,sizeof(SharedMemoryCommand),1,m_file);
cmd->m_updateFlags = unused.m_updateFlags;
#endif
switch (commandType)
{
case CMD_LOAD_MJCF:
{
#ifdef BACKWARD_COMPAT
cmd->m_mjcfArguments = unused.m_mjcfArguments;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_mjcfArguments,sizeof(MjcfArgs),1,m_file);
#endif
result=true;
break;
}
case CMD_REQUEST_BODY_INFO:
{
#ifdef BACKWARD_COMPAT
cmd->m_sdfRequestInfoArgs = unused.m_sdfRequestInfoArgs;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_sdfRequestInfoArgs,sizeof(SdfRequestInfoArgs),1,m_file);
#endif
result=true;
break;
}
case CMD_REQUEST_VISUAL_SHAPE_INFO:
{
#ifdef BACKWARD_COMPAT
cmd->m_requestVisualShapeDataArguments = unused.m_requestVisualShapeDataArguments;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_requestVisualShapeDataArguments,sizeof(RequestVisualShapeDataArgs),1,m_file);
#endif
result=true;
break;
}
case CMD_LOAD_URDF:
{
#ifdef BACKWARD_COMPAT
cmd->m_urdfArguments = unused.m_urdfArguments;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_urdfArguments,sizeof(UrdfArgs),1,m_file);
#endif
result=true;
break;
}
case CMD_INIT_POSE:
{
#ifdef BACKWARD_COMPAT
cmd->m_initPoseArgs = unused.m_initPoseArgs;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_initPoseArgs,sizeof(InitPoseArgs),1,m_file);
#endif
result=true;
break;
};
case CMD_REQUEST_ACTUAL_STATE:
{
#ifdef BACKWARD_COMPAT
cmd->m_requestActualStateInformationCommandArgument = unused.m_requestActualStateInformationCommandArgument;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_requestActualStateInformationCommandArgument,sizeof(RequestActualStateArgs),1,m_file);
#endif
result=true;
break;
};
case CMD_SEND_DESIRED_STATE:
{
#ifdef BACKWARD_COMPAT
cmd->m_sendDesiredStateCommandArgument = unused.m_sendDesiredStateCommandArgument;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_sendDesiredStateCommandArgument ,sizeof(SendDesiredStateArgs),1,m_file);
#endif
result = true;
break;
}
case CMD_SEND_PHYSICS_SIMULATION_PARAMETERS:
{
#ifdef BACKWARD_COMPAT
cmd->m_physSimParamArgs = unused.m_physSimParamArgs;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_physSimParamArgs ,sizeof(SendPhysicsSimulationParameters),1,m_file);
#endif
result = true;
break;
}
case CMD_REQUEST_CONTACT_POINT_INFORMATION:
{
#ifdef BACKWARD_COMPAT
cmd->m_requestContactPointArguments = unused.m_requestContactPointArguments;
#else
fread(&cmd->m_updateFlags,sizeof(int),1,m_file);
fread(&cmd->m_requestContactPointArguments ,sizeof(RequestContactDataArgs),1,m_file);
#endif
result = true;
break;
}
case CMD_STEP_FORWARD_SIMULATION:
case CMD_RESET_SIMULATION:
case CMD_REQUEST_INTERNAL_DATA:
{
result=true;
break;
}
default:
{
s = fread(cmd,sizeof(SharedMemoryCommand),1,m_file);
result=(s==1);
}
};
} }
} }
return false; return result;
} }
}; };
@@ -3458,7 +3671,7 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm
serverStatusOut.m_dataStreamArguments.m_bodyUniqueId = sdfInfoArgs.m_bodyUniqueId; serverStatusOut.m_dataStreamArguments.m_bodyUniqueId = sdfInfoArgs.m_bodyUniqueId;
serverStatusOut.m_dataStreamArguments.m_bodyName[0] = 0; serverStatusOut.m_dataStreamArguments.m_bodyName[0] = 0;
InternalBodyHandle* bodyHandle = m_data->m_bodyHandles.getHandle(clientCmd.m_calculateJacobianArguments.m_bodyUniqueId); InternalBodyHandle* bodyHandle = m_data->m_bodyHandles.getHandle(sdfInfoArgs.m_bodyUniqueId);
if (bodyHandle) if (bodyHandle)
{ {
strcpy(serverStatusOut.m_dataStreamArguments.m_bodyName,bodyHandle->m_bodyName.c_str()); strcpy(serverStatusOut.m_dataStreamArguments.m_bodyName,bodyHandle->m_bodyName.c_str());

View File

@@ -1,10 +1,10 @@
IF(BUILD_BULLET3) IF(BUILD_BULLET3)
SUBDIRS( Bullet3OpenCL Bullet3Serialize/Bullet2FileLoader Bullet3Dynamics Bullet3Collision Bullet3Geometry Bullet3Common ) SUBDIRS( Bullet3OpenCL Bullet3Serialize/Bullet2FileLoader Bullet3Dynamics Bullet3Collision Bullet3Geometry )
SUBDIRS( BulletInverseDynamics )
ENDIF(BUILD_BULLET3) ENDIF(BUILD_BULLET3)
SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
SUBDIRS( BulletInverseDynamics BulletSoftBody BulletCollision BulletDynamics LinearMath Bullet3Common)
IF(INSTALL_LIBS) IF(INSTALL_LIBS)