diff --git a/Extras/CMakeLists.txt b/Extras/CMakeLists.txt index fc0d22604..58a161a45 100644 --- a/Extras/CMakeLists.txt +++ b/Extras/CMakeLists.txt @@ -1,5 +1,36 @@ -SUBDIRS( InverseDynamics BulletRoboticsGUI BulletRobotics obj2sdf Serialize ConvexDecomposition HACD GIMPACTUtils ) +OPTION(BUILD_INVERSE_DYNAMIC_EXTRA "Build InverseDynamic extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_BULLET_ROBOTICS_GUI_EXTRA "Build BulletRoboticsGUI extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_BULLET_ROBOTICS_EXTRA "Build BulletRobotics extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_OBJ2SDF_EXTRA "Build obj2sdf extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_SERIALIZE_EXTRA "Build Serialize extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_CONVEX_DECOMPOSITION_EXTRA "Build ConvexDecomposition extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_HACD_EXTRA "Build HACD extra module, only applied when BUILD_EXTRAS is ON" ON) +OPTION(BUILD_GIMPACTUTILS_EXTRA "Build GIMPACTUtils extra module, only applied when BUILD_EXTRAS is ON" ON) +IF(BUILD_INVERSE_DYNAMIC_EXTRA) + SUBDIRS( InverseDynamics ) +ENDIF() +IF(BUILD_BULLET_ROBOTICS_GUI_EXTRA) + SUBDIRS( BulletRoboticsGUI ) +ENDIF() +IF(BUILD_BULLET_ROBOTICS_EXTRA) + SUBDIRS( BulletRobotics ) +ENDIF() +IF(BUILD_OBJ2SDF_EXTRA) + SUBDIRS( obj2sdf ) +ENDIF() +IF(BUILD_SERIALIZE_EXTRA) + SUBDIRS( Serialize ) +ENDIF() +IF(BUILD_CONVEX_DECOMPOSITION_EXTRA) + SUBDIRS( ConvexDecomposition ) +ENDIF() +IF(BUILD_HACD_EXTRA) + SUBDIRS( HACD ) +ENDIF() +IF(BUILD_GIMPACTUTILS_EXTRA) + SUBDIRS( GIMPACTUtils ) +ENDIF() #Maya Dynamica plugin is moved to http://dynamica.googlecode.com diff --git a/examples/RobotSimulator/CMakeLists.txt b/examples/RobotSimulator/CMakeLists.txt index b2d6c2412..c17481f8c 100644 --- a/examples/RobotSimulator/CMakeLists.txt +++ b/examples/RobotSimulator/CMakeLists.txt @@ -149,7 +149,7 @@ ELSE() IF(NOT APPLE) FIND_PACKAGE(Threads) TARGET_LINK_LIBRARIES( App_HelloBulletRobotics ${CMAKE_THREAD_LIBS_INIT} ${DL} ) - ENDIF(APPLE) + ENDIF(NOT APPLE) ENDIF(WIN32) diff --git a/src/BulletSoftBody/btDeformableBodySolver.cpp b/src/BulletSoftBody/btDeformableBodySolver.cpp index 4b11fccec..e81680f01 100644 --- a/src/BulletSoftBody/btDeformableBodySolver.cpp +++ b/src/BulletSoftBody/btDeformableBodySolver.cpp @@ -405,6 +405,10 @@ void btDeformableBodySolver::predictMotion(btScalar solverdt) for (int i = 0; i < m_softBodies.size(); ++i) { btSoftBody* psb = m_softBodies[i]; + /* Clear contacts */ + psb->m_nodeRigidContacts.resize(0); + psb->m_faceRigidContacts.resize(0); + psb->m_faceNodeContacts.resize(0); if (psb->isActive()) { @@ -472,10 +476,6 @@ void btDeformableBodySolver::predictDeformableMotion(btSoftBody* psb, btScalar d { psb->updateFaceTree(true, true); } - /* Clear contacts */ - psb->m_nodeRigidContacts.resize(0); - psb->m_faceRigidContacts.resize(0); - psb->m_faceNodeContacts.resize(0); /* Optimize dbvt's */ // psb->m_ndbvt.optimizeIncremental(1); // psb->m_fdbvt.optimizeIncremental(1);