Improve CMake support:
Add CMake install support for libbulletmath,libbulletcollision,libbulletdynamics,libbulletsoftbody,and toplevel include files Options to enable/disable BUILD_DEMOS and BUILD_ETRAS Fixed compile issue in BulletMultiThreaded Fixed double-precision issues with btMatrix3x3::getEulerZYX
This commit is contained in:
128
CMakeLists.txt
128
CMakeLists.txt
@@ -1,59 +1,69 @@
|
|||||||
cmake_minimum_required(VERSION 2.4)
|
cmake_minimum_required(VERSION 2.4)
|
||||||
|
|
||||||
PROJECT(BULLET_PHYSICS)
|
PROJECT(BULLET_PHYSICS)
|
||||||
|
|
||||||
IF (NOT CMAKE_BUILD_TYPE)
|
IF (NOT CMAKE_BUILD_TYPE)
|
||||||
SET(CMAKE_BUILD_TYPE "Debug")
|
SET(CMAKE_BUILD_TYPE "Debug")
|
||||||
ENDIF (NOT CMAKE_BUILD_TYPE)
|
ENDIF (NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IF(COMMAND cmake_policy)
|
IF(COMMAND cmake_policy)
|
||||||
cmake_policy(SET CMP0003 NEW)
|
cmake_policy(SET CMP0003 NEW)
|
||||||
ENDIF(COMMAND cmake_policy)
|
ENDIF(COMMAND cmake_policy)
|
||||||
|
|
||||||
|
|
||||||
# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
|
# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
|
||||||
# This should be the case.
|
# This should be the case.
|
||||||
|
|
||||||
FIND_PACKAGE(OpenGL)
|
FIND_PACKAGE(OpenGL)
|
||||||
IF (OPENGL_FOUND)
|
IF (OPENGL_FOUND)
|
||||||
MESSAGE("OPENGL FOUND")
|
MESSAGE("OPENGL FOUND")
|
||||||
MESSAGE(${OPENGL_LIBRARIES})
|
MESSAGE(${OPENGL_LIBRARIES})
|
||||||
ELSE (OPENGL_FOUND)
|
ELSE (OPENGL_FOUND)
|
||||||
MESSAGE("OPENGL NOT FOUND")
|
MESSAGE("OPENGL NOT FOUND")
|
||||||
SET(OPENGL_gl_LIBRARY opengl32)
|
SET(OPENGL_gl_LIBRARY opengl32)
|
||||||
SET(OPENGL_glu_LIBRARY glu32)
|
SET(OPENGL_glu_LIBRARY glu32)
|
||||||
ENDIF (OPENGL_FOUND)
|
ENDIF (OPENGL_FOUND)
|
||||||
|
|
||||||
# ADD_DEFINITIONS(-DBT_USE_FREEGLUT)
|
# ADD_DEFINITIONS(-DBT_USE_FREEGLUT)
|
||||||
|
|
||||||
FIND_PACKAGE(GLU)
|
FIND_PACKAGE(GLU)
|
||||||
|
|
||||||
FIND_PACKAGE(GLUT)
|
FIND_PACKAGE(GLUT)
|
||||||
IF (GLUT_FOUND)
|
IF (GLUT_FOUND)
|
||||||
MESSAGE("GLUT FOUND")
|
MESSAGE("GLUT FOUND")
|
||||||
MESSAGE(${GLUT_glut_LIBRARY})
|
MESSAGE(${GLUT_glut_LIBRARY})
|
||||||
ELSE (GLUT_FOUND)
|
ELSE (GLUT_FOUND)
|
||||||
|
|
||||||
IF (MINGW)
|
IF (MINGW)
|
||||||
MESSAGE ("GLUT NOT FOUND not found, trying to use MINGW glut32")
|
MESSAGE ("GLUT NOT FOUND not found, trying to use MINGW glut32")
|
||||||
SET(GLUT_glut_LIBRARY glut32)
|
SET(GLUT_glut_LIBRARY glut32)
|
||||||
ENDIF (MINGW)
|
ENDIF (MINGW)
|
||||||
|
|
||||||
IF (MSVC)
|
IF (MSVC)
|
||||||
MESSAGE ("GLUT NOT FOUND, trying to use Bullet/Glut/glut32.lib for MSVC")
|
MESSAGE ("GLUT NOT FOUND, trying to use Bullet/Glut/glut32.lib for MSVC")
|
||||||
SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib)
|
SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib)
|
||||||
ENDIF (MSVC)
|
ENDIF (MSVC)
|
||||||
ENDIF (GLUT_FOUND)
|
ENDIF (GLUT_FOUND)
|
||||||
|
|
||||||
|
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/Glut)
|
INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/Glut)
|
||||||
ELSE (WIN32)
|
ELSE (WIN32)
|
||||||
# This is the lines for linux. This should always work if everything is installed and working fine.
|
# This is the lines for linux. This should always work if everything is installed and working fine.
|
||||||
INCLUDE_DIRECTORIES(/usr/include /usr/local/include ${GLUT_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(/usr/include /usr/local/include ${GLUT_INCLUDE_DIR})
|
||||||
ENDIF (WIN32)
|
ENDIF (WIN32)
|
||||||
|
|
||||||
|
|
||||||
SUBDIRS(src Demos Extras)
|
OPTION(BUILD_DEMOS "Set when you want to build the demos" ON)
|
||||||
|
IF(BUILD_DEMOS)
|
||||||
|
SUBDIRS(Demos)
|
||||||
|
ENDIF(BUILD_DEMOS)
|
||||||
|
|
||||||
|
OPTION(BUILD_EXTRAS "Set when you want to build the extras" ON)
|
||||||
|
IF(BUILD_EXTRAS)
|
||||||
|
SUBDIRS(Extras)
|
||||||
|
ENDIF(BUILD_EXTRAS)
|
||||||
|
|
||||||
|
SUBDIRS(src)
|
||||||
|
|||||||
@@ -1,135 +1,70 @@
|
|||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(LibBulletCollision
|
SET(LibBulletCollision_SRCS
|
||||||
BroadphaseCollision/btAxisSweep3.cpp
|
BroadphaseCollision/btAxisSweep3.cpp
|
||||||
BroadphaseCollision/btAxisSweep3.h
|
|
||||||
BroadphaseCollision/btBroadphaseProxy.cpp
|
BroadphaseCollision/btBroadphaseProxy.cpp
|
||||||
BroadphaseCollision/btBroadphaseProxy.h
|
|
||||||
BroadphaseCollision/btCollisionAlgorithm.cpp
|
BroadphaseCollision/btCollisionAlgorithm.cpp
|
||||||
BroadphaseCollision/btCollisionAlgorithm.h
|
|
||||||
BroadphaseCollision/btDispatcher.cpp
|
BroadphaseCollision/btDispatcher.cpp
|
||||||
BroadphaseCollision/btDispatcher.h
|
|
||||||
BroadphaseCollision/btDbvtBroadphase.cpp
|
BroadphaseCollision/btDbvtBroadphase.cpp
|
||||||
BroadphaseCollision/btDbvtBroadphase.h
|
|
||||||
BroadphaseCollision/btDbvt.cpp
|
BroadphaseCollision/btDbvt.cpp
|
||||||
BroadphaseCollision/btDbvt.h
|
|
||||||
BroadphaseCollision/btMultiSapBroadphase.cpp
|
BroadphaseCollision/btMultiSapBroadphase.cpp
|
||||||
BroadphaseCollision/btMultiSapBroadphase.h
|
|
||||||
BroadphaseCollision/btOverlappingPairCache.cpp
|
BroadphaseCollision/btOverlappingPairCache.cpp
|
||||||
BroadphaseCollision/btOverlappingPairCache.h
|
|
||||||
BroadphaseCollision/btOverlappingPairCallback.h
|
|
||||||
BroadphaseCollision/btQuantizedBvh.cpp
|
BroadphaseCollision/btQuantizedBvh.cpp
|
||||||
BroadphaseCollision/btQuantizedBvh.h
|
|
||||||
BroadphaseCollision/btSimpleBroadphase.cpp
|
BroadphaseCollision/btSimpleBroadphase.cpp
|
||||||
BroadphaseCollision/btSimpleBroadphase.h
|
|
||||||
CollisionDispatch/btCollisionDispatcher.cpp
|
CollisionDispatch/btCollisionDispatcher.cpp
|
||||||
CollisionDispatch/btCollisionDispatcher.h
|
|
||||||
CollisionDispatch/btCollisionObject.cpp
|
CollisionDispatch/btCollisionObject.cpp
|
||||||
CollisionDispatch/btCollisionObject.h
|
|
||||||
CollisionDispatch/btCollisionWorld.cpp
|
CollisionDispatch/btCollisionWorld.cpp
|
||||||
CollisionDispatch/btCollisionWorld.h
|
|
||||||
CollisionDispatch/btCompoundCollisionAlgorithm.cpp
|
CollisionDispatch/btCompoundCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btCompoundCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
|
CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btDefaultCollisionConfiguration.cpp
|
CollisionDispatch/btDefaultCollisionConfiguration.cpp
|
||||||
CollisionDispatch/btDefaultCollisionConfiguration.h
|
|
||||||
CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
|
CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btSphereSphereCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
|
CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btBoxBoxCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btBoxBoxDetector.cpp
|
CollisionDispatch/btBoxBoxDetector.cpp
|
||||||
CollisionDispatch/btBoxBoxDetector.h
|
|
||||||
CollisionDispatch/btGhostObject.cpp
|
CollisionDispatch/btGhostObject.cpp
|
||||||
CollisionDispatch/btGhostObject.h
|
|
||||||
CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
|
CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btSphereBoxCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
|
CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
|
CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btConvexConvexAlgorithm.cpp
|
CollisionDispatch/btConvexConvexAlgorithm.cpp
|
||||||
CollisionDispatch/btConvexConvexAlgorithm.h
|
|
||||||
CollisionDispatch/btEmptyCollisionAlgorithm.cpp
|
CollisionDispatch/btEmptyCollisionAlgorithm.cpp
|
||||||
CollisionDispatch/btEmptyCollisionAlgorithm.h
|
|
||||||
CollisionDispatch/btManifoldResult.cpp
|
CollisionDispatch/btManifoldResult.cpp
|
||||||
CollisionDispatch/btManifoldResult.h
|
|
||||||
CollisionDispatch/btSimulationIslandManager.cpp
|
CollisionDispatch/btSimulationIslandManager.cpp
|
||||||
CollisionDispatch/btSimulationIslandManager.h
|
|
||||||
CollisionDispatch/btUnionFind.cpp
|
CollisionDispatch/btUnionFind.cpp
|
||||||
CollisionDispatch/btUnionFind.h
|
|
||||||
CollisionDispatch/SphereTriangleDetector.cpp
|
CollisionDispatch/SphereTriangleDetector.cpp
|
||||||
CollisionDispatch/SphereTriangleDetector.h
|
|
||||||
CollisionShapes/btBoxShape.cpp
|
CollisionShapes/btBoxShape.cpp
|
||||||
CollisionShapes/btBoxShape.h
|
|
||||||
CollisionShapes/btBvhTriangleMeshShape.cpp
|
CollisionShapes/btBvhTriangleMeshShape.cpp
|
||||||
CollisionShapes/btBvhTriangleMeshShape.h
|
|
||||||
CollisionShapes/btCapsuleShape.cpp
|
CollisionShapes/btCapsuleShape.cpp
|
||||||
CollisionShapes/btCapsuleShape.h
|
|
||||||
CollisionShapes/btCollisionShape.cpp
|
CollisionShapes/btCollisionShape.cpp
|
||||||
CollisionShapes/btCollisionShape.h
|
|
||||||
CollisionShapes/btCompoundShape.cpp
|
CollisionShapes/btCompoundShape.cpp
|
||||||
CollisionShapes/btCompoundShape.h
|
|
||||||
CollisionShapes/btConcaveShape.cpp
|
CollisionShapes/btConcaveShape.cpp
|
||||||
CollisionShapes/btConcaveShape.h
|
|
||||||
CollisionShapes/btConeShape.cpp
|
CollisionShapes/btConeShape.cpp
|
||||||
CollisionShapes/btConeShape.h
|
|
||||||
CollisionShapes/btConvexHullShape.cpp
|
CollisionShapes/btConvexHullShape.cpp
|
||||||
CollisionShapes/btConvexHullShape.h
|
|
||||||
CollisionShapes/btConvexPointCloudShape.cpp
|
CollisionShapes/btConvexPointCloudShape.cpp
|
||||||
CollisionShapes/btConvexPointCloudShape.h
|
|
||||||
CollisionShapes/btConvexShape.cpp
|
CollisionShapes/btConvexShape.cpp
|
||||||
CollisionShapes/btConvexShape.h
|
|
||||||
CollisionShapes/btConvexInternalShape.cpp
|
CollisionShapes/btConvexInternalShape.cpp
|
||||||
CollisionShapes/btConvexInternalShape.h
|
|
||||||
CollisionShapes/btConvexTriangleMeshShape.cpp
|
CollisionShapes/btConvexTriangleMeshShape.cpp
|
||||||
CollisionShapes/btConvexTriangleMeshShape.h
|
|
||||||
CollisionShapes/btCylinderShape.cpp
|
CollisionShapes/btCylinderShape.cpp
|
||||||
CollisionShapes/btCylinderShape.h
|
|
||||||
CollisionShapes/btEmptyShape.cpp
|
CollisionShapes/btEmptyShape.cpp
|
||||||
CollisionShapes/btEmptyShape.h
|
|
||||||
CollisionShapes/btHeightfieldTerrainShape.cpp
|
CollisionShapes/btHeightfieldTerrainShape.cpp
|
||||||
CollisionShapes/btHeightfieldTerrainShape.h
|
|
||||||
CollisionShapes/btMinkowskiSumShape.cpp
|
CollisionShapes/btMinkowskiSumShape.cpp
|
||||||
CollisionShapes/btMinkowskiSumShape.h
|
|
||||||
CollisionShapes/btMaterial.h
|
|
||||||
CollisionShapes/btMultimaterialTriangleMeshShape.cpp
|
CollisionShapes/btMultimaterialTriangleMeshShape.cpp
|
||||||
CollisionShapes/btMultimaterialTriangleMeshShape.h
|
|
||||||
CollisionShapes/btMultiSphereShape.cpp
|
CollisionShapes/btMultiSphereShape.cpp
|
||||||
CollisionShapes/btMultiSphereShape.h
|
|
||||||
CollisionShapes/btOptimizedBvh.cpp
|
CollisionShapes/btOptimizedBvh.cpp
|
||||||
CollisionShapes/btOptimizedBvh.h
|
|
||||||
CollisionShapes/btPolyhedralConvexShape.cpp
|
CollisionShapes/btPolyhedralConvexShape.cpp
|
||||||
CollisionShapes/btPolyhedralConvexShape.h
|
|
||||||
CollisionShapes/btScaledBvhTriangleMeshShape.cpp
|
CollisionShapes/btScaledBvhTriangleMeshShape.cpp
|
||||||
CollisionShapes/btScaledBvhTriangleMeshShape.h
|
|
||||||
CollisionShapes/btTetrahedronShape.cpp
|
CollisionShapes/btTetrahedronShape.cpp
|
||||||
CollisionShapes/btTetrahedronShape.h
|
|
||||||
CollisionShapes/btSphereShape.cpp
|
CollisionShapes/btSphereShape.cpp
|
||||||
CollisionShapes/btSphereShape.h
|
|
||||||
CollisionShapes/btShapeHull.h
|
|
||||||
CollisionShapes/btShapeHull.cpp
|
CollisionShapes/btShapeHull.cpp
|
||||||
CollisionShapes/btStaticPlaneShape.cpp
|
CollisionShapes/btStaticPlaneShape.cpp
|
||||||
CollisionShapes/btStaticPlaneShape.h
|
|
||||||
CollisionShapes/btStridingMeshInterface.cpp
|
CollisionShapes/btStridingMeshInterface.cpp
|
||||||
CollisionShapes/btStridingMeshInterface.h
|
|
||||||
CollisionShapes/btTriangleCallback.cpp
|
CollisionShapes/btTriangleCallback.cpp
|
||||||
CollisionShapes/btTriangleCallback.h
|
|
||||||
CollisionShapes/btTriangleBuffer.cpp
|
CollisionShapes/btTriangleBuffer.cpp
|
||||||
CollisionShapes/btTriangleBuffer.h
|
|
||||||
CollisionShapes/btTriangleIndexVertexArray.cpp
|
CollisionShapes/btTriangleIndexVertexArray.cpp
|
||||||
CollisionShapes/btTriangleIndexVertexArray.h
|
|
||||||
CollisionShapes/btTriangleIndexVertexMaterialArray.h
|
|
||||||
CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
|
CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
|
||||||
CollisionShapes/btTriangleMesh.cpp
|
CollisionShapes/btTriangleMesh.cpp
|
||||||
CollisionShapes/btTriangleMesh.h
|
|
||||||
CollisionShapes/btTriangleMeshShape.cpp
|
CollisionShapes/btTriangleMeshShape.cpp
|
||||||
CollisionShapes/btTriangleMeshShape.h
|
|
||||||
CollisionShapes/btUniformScalingShape.cpp
|
CollisionShapes/btUniformScalingShape.cpp
|
||||||
CollisionShapes/btUniformScalingShape.h
|
|
||||||
Gimpact/btContactProcessing.cpp
|
Gimpact/btContactProcessing.cpp
|
||||||
Gimpact/btGImpactShape.cpp
|
Gimpact/btGImpactShape.cpp
|
||||||
Gimpact/gim_contact.cpp
|
Gimpact/gim_contact.cpp
|
||||||
@@ -142,25 +77,109 @@ ADD_LIBRARY(LibBulletCollision
|
|||||||
Gimpact/btGImpactQuantizedBvh.cpp
|
Gimpact/btGImpactQuantizedBvh.cpp
|
||||||
Gimpact/gim_box_set.cpp
|
Gimpact/gim_box_set.cpp
|
||||||
NarrowPhaseCollision/btContinuousConvexCollision.cpp
|
NarrowPhaseCollision/btContinuousConvexCollision.cpp
|
||||||
NarrowPhaseCollision/btContinuousConvexCollision.h
|
|
||||||
NarrowPhaseCollision/btGjkEpa2.cpp
|
NarrowPhaseCollision/btGjkEpa2.cpp
|
||||||
NarrowPhaseCollision/btGjkEpa2.h
|
|
||||||
NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
|
NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
|
||||||
NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
|
|
||||||
NarrowPhaseCollision/btConvexCast.cpp
|
NarrowPhaseCollision/btConvexCast.cpp
|
||||||
NarrowPhaseCollision/btConvexCast.h
|
|
||||||
NarrowPhaseCollision/btGjkConvexCast.cpp
|
NarrowPhaseCollision/btGjkConvexCast.cpp
|
||||||
NarrowPhaseCollision/btGjkConvexCast.h
|
|
||||||
NarrowPhaseCollision/btGjkPairDetector.cpp
|
NarrowPhaseCollision/btGjkPairDetector.cpp
|
||||||
NarrowPhaseCollision/btGjkPairDetector.h
|
|
||||||
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
|
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
|
||||||
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
|
|
||||||
NarrowPhaseCollision/btPersistentManifold.cpp
|
NarrowPhaseCollision/btPersistentManifold.cpp
|
||||||
NarrowPhaseCollision/btPersistentManifold.h
|
|
||||||
NarrowPhaseCollision/btRaycastCallback.cpp
|
NarrowPhaseCollision/btRaycastCallback.cpp
|
||||||
NarrowPhaseCollision/btRaycastCallback.h
|
|
||||||
NarrowPhaseCollision/btSubSimplexConvexCast.cpp
|
NarrowPhaseCollision/btSubSimplexConvexCast.cpp
|
||||||
NarrowPhaseCollision/btSubSimplexConvexCast.h
|
|
||||||
NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
|
NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LibBulletCollision_HDRS
|
||||||
|
BroadphaseCollision/btAxisSweep3.h
|
||||||
|
BroadphaseCollision/btBroadphaseProxy.h
|
||||||
|
BroadphaseCollision/btCollisionAlgorithm.h
|
||||||
|
BroadphaseCollision/btDispatcher.h
|
||||||
|
BroadphaseCollision/btDbvtBroadphase.h
|
||||||
|
BroadphaseCollision/btDbvt.h
|
||||||
|
BroadphaseCollision/btMultiSapBroadphase.h
|
||||||
|
BroadphaseCollision/btOverlappingPairCache.h
|
||||||
|
BroadphaseCollision/btOverlappingPairCallback.h
|
||||||
|
BroadphaseCollision/btQuantizedBvh.h
|
||||||
|
BroadphaseCollision/btSimpleBroadphase.h
|
||||||
|
CollisionDispatch/btCollisionDispatcher.h
|
||||||
|
CollisionDispatch/btCollisionObject.h
|
||||||
|
CollisionDispatch/btCollisionWorld.h
|
||||||
|
CollisionDispatch/btCompoundCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btDefaultCollisionConfiguration.h
|
||||||
|
CollisionDispatch/btSphereSphereCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btBoxBoxCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btBoxBoxDetector.h
|
||||||
|
CollisionDispatch/btGhostObject.h
|
||||||
|
CollisionDispatch/btSphereBoxCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btConvexConvexAlgorithm.h
|
||||||
|
CollisionDispatch/btEmptyCollisionAlgorithm.h
|
||||||
|
CollisionDispatch/btManifoldResult.h
|
||||||
|
CollisionDispatch/btSimulationIslandManager.h
|
||||||
|
CollisionDispatch/btUnionFind.h
|
||||||
|
CollisionDispatch/SphereTriangleDetector.h
|
||||||
|
CollisionShapes/btBoxShape.h
|
||||||
|
CollisionShapes/btBvhTriangleMeshShape.h
|
||||||
|
CollisionShapes/btCapsuleShape.h
|
||||||
|
CollisionShapes/btCollisionShape.h
|
||||||
|
CollisionShapes/btCompoundShape.h
|
||||||
|
CollisionShapes/btConcaveShape.h
|
||||||
|
CollisionShapes/btConeShape.h
|
||||||
|
CollisionShapes/btConvexHullShape.h
|
||||||
|
CollisionShapes/btConvexPointCloudShape.h
|
||||||
|
CollisionShapes/btConvexShape.h
|
||||||
|
CollisionShapes/btConvexInternalShape.h
|
||||||
|
CollisionShapes/btConvexTriangleMeshShape.h
|
||||||
|
CollisionShapes/btCylinderShape.h
|
||||||
|
CollisionShapes/btEmptyShape.h
|
||||||
|
CollisionShapes/btHeightfieldTerrainShape.h
|
||||||
|
CollisionShapes/btMinkowskiSumShape.h
|
||||||
|
CollisionShapes/btMaterial.h
|
||||||
|
CollisionShapes/btMultimaterialTriangleMeshShape.h
|
||||||
|
CollisionShapes/btMultiSphereShape.h
|
||||||
|
CollisionShapes/btOptimizedBvh.h
|
||||||
|
CollisionShapes/btPolyhedralConvexShape.h
|
||||||
|
CollisionShapes/btScaledBvhTriangleMeshShape.h
|
||||||
|
CollisionShapes/btTetrahedronShape.h
|
||||||
|
CollisionShapes/btSphereShape.h
|
||||||
|
CollisionShapes/btShapeHull.h
|
||||||
|
CollisionShapes/btStaticPlaneShape.h
|
||||||
|
CollisionShapes/btStridingMeshInterface.h
|
||||||
|
CollisionShapes/btTriangleCallback.h
|
||||||
|
CollisionShapes/btTriangleBuffer.h
|
||||||
|
CollisionShapes/btTriangleIndexVertexArray.h
|
||||||
|
CollisionShapes/btTriangleIndexVertexMaterialArray.h
|
||||||
|
CollisionShapes/btTriangleMesh.h
|
||||||
|
CollisionShapes/btTriangleMeshShape.h
|
||||||
|
CollisionShapes/btUniformScalingShape.h
|
||||||
|
Gimpact/btGImpactShape.h
|
||||||
|
Gimpact/gim_contact.h
|
||||||
|
Gimpact/btGImpactBvh.h
|
||||||
|
Gimpact/btGenericPoolAllocator.h
|
||||||
|
Gimpact/gim_memory.h
|
||||||
|
Gimpact/btGImpactCollisionAlgorithm.h
|
||||||
|
Gimpact/btTriangleShapeEx.h
|
||||||
|
Gimpact/gim_tri_collision.h
|
||||||
|
Gimpact/btGImpactQuantizedBvh.h
|
||||||
|
Gimpact/gim_box_set.h
|
||||||
|
NarrowPhaseCollision/btContinuousConvexCollision.h
|
||||||
|
NarrowPhaseCollision/btContinuousConvexCollision.h
|
||||||
|
NarrowPhaseCollision/btGjkEpa2.h
|
||||||
|
NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
|
||||||
|
NarrowPhaseCollision/btConvexCast.h
|
||||||
|
NarrowPhaseCollision/btGjkConvexCast.h
|
||||||
|
NarrowPhaseCollision/btGjkPairDetector.h
|
||||||
|
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
|
||||||
|
NarrowPhaseCollision/btPersistentManifold.h
|
||||||
|
NarrowPhaseCollision/btRaycastCallback.h
|
||||||
|
NarrowPhaseCollision/btSubSimplexConvexCast.h
|
||||||
NarrowPhaseCollision/btVoronoiSimplexSolver.h
|
NarrowPhaseCollision/btVoronoiSimplexSolver.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#ADD_LIBRARY(LibBulletCollision SHARED ${LibBulletCollision_SRCS} ${LibBulletCollision_HDRS})
|
||||||
|
ADD_LIBRARY(LibBulletCollision ${LibBulletCollision_SRCS} ${LibBulletCollision_HDRS})
|
||||||
|
|
||||||
|
INSTALL(TARGETS LibBulletCollision DESTINATION lib)
|
||||||
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||||
|
|||||||
@@ -2,35 +2,43 @@ INCLUDE_DIRECTORIES(
|
|||||||
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(LibBulletDynamics
|
SET(LibBulletDynamics_SRCS
|
||||||
|
|
||||||
ConstraintSolver/btContactConstraint.cpp
|
ConstraintSolver/btContactConstraint.cpp
|
||||||
ConstraintSolver/btContactConstraint.h
|
|
||||||
ConstraintSolver/btConeTwistConstraint.cpp
|
ConstraintSolver/btConeTwistConstraint.cpp
|
||||||
ConstraintSolver/btConeTwistConstraint.h
|
|
||||||
ConstraintSolver/btGeneric6DofConstraint.cpp
|
ConstraintSolver/btGeneric6DofConstraint.cpp
|
||||||
ConstraintSolver/btGeneric6DofConstraint.h
|
|
||||||
ConstraintSolver/btHingeConstraint.cpp
|
ConstraintSolver/btHingeConstraint.cpp
|
||||||
ConstraintSolver/btHingeConstraint.h
|
|
||||||
ConstraintSolver/btPoint2PointConstraint.cpp
|
ConstraintSolver/btPoint2PointConstraint.cpp
|
||||||
ConstraintSolver/btPoint2PointConstraint.h
|
|
||||||
ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
|
ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
|
||||||
ConstraintSolver/btSequentialImpulseConstraintSolver.h
|
|
||||||
ConstraintSolver/btSliderConstraint.cpp
|
ConstraintSolver/btSliderConstraint.cpp
|
||||||
ConstraintSolver/btSliderConstraint.h
|
|
||||||
ConstraintSolver/btSolve2LinearConstraint.cpp
|
ConstraintSolver/btSolve2LinearConstraint.cpp
|
||||||
ConstraintSolver/btSolve2LinearConstraint.h
|
|
||||||
ConstraintSolver/btTypedConstraint.cpp
|
ConstraintSolver/btTypedConstraint.cpp
|
||||||
ConstraintSolver/btTypedConstraint.h
|
|
||||||
Dynamics/Bullet-C-API.cpp
|
Dynamics/Bullet-C-API.cpp
|
||||||
Dynamics/btDiscreteDynamicsWorld.cpp
|
Dynamics/btDiscreteDynamicsWorld.cpp
|
||||||
Dynamics/btDiscreteDynamicsWorld.h
|
|
||||||
Dynamics/btSimpleDynamicsWorld.cpp
|
Dynamics/btSimpleDynamicsWorld.cpp
|
||||||
Dynamics/btSimpleDynamicsWorld.h
|
|
||||||
Dynamics/btRigidBody.cpp
|
Dynamics/btRigidBody.cpp
|
||||||
Dynamics/btRigidBody.h
|
|
||||||
Vehicle/btRaycastVehicle.cpp
|
Vehicle/btRaycastVehicle.cpp
|
||||||
Vehicle/btRaycastVehicle.h
|
|
||||||
Vehicle/btWheelInfo.cpp
|
Vehicle/btWheelInfo.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LibBulletDynamics_HDRS
|
||||||
|
ConstraintSolver/btContactConstraint.h
|
||||||
|
ConstraintSolver/btConeTwistConstraint.h
|
||||||
|
ConstraintSolver/btGeneric6DofConstraint.h
|
||||||
|
ConstraintSolver/btHingeConstraint.h
|
||||||
|
ConstraintSolver/btPoint2PointConstraint.h
|
||||||
|
ConstraintSolver/btSequentialImpulseConstraintSolver.h
|
||||||
|
ConstraintSolver/btSliderConstraint.h
|
||||||
|
ConstraintSolver/btSolve2LinearConstraint.h
|
||||||
|
ConstraintSolver/btTypedConstraint.h
|
||||||
|
Dynamics/btDiscreteDynamicsWorld.h
|
||||||
|
Dynamics/btSimpleDynamicsWorld.h
|
||||||
|
Dynamics/btRigidBody.h
|
||||||
|
Vehicle/btRaycastVehicle.h
|
||||||
Vehicle/btWheelInfo.h
|
Vehicle/btWheelInfo.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#ADD_LIBRARY(LibBulletDynamics SHARED ${LibBulletDynamics_SRCS} ${LibBulletDynamics_HDRS})
|
||||||
|
ADD_LIBRARY(LibBulletDynamics ${LibBulletDynamics_SRCS} ${LibBulletDynamics_HDRS})
|
||||||
|
|
||||||
|
INSTALL(TARGETS LibBulletDynamics DESTINATION lib)
|
||||||
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ SpuSubsimplexRayCast::SpuSubsimplexRayCast (void* shapeB, SpuConvexPolyhedronVer
|
|||||||
* MSUM(Pellet, ConvexShape)
|
* MSUM(Pellet, ConvexShape)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void supportPoints (const btTransform xformRay,
|
void supportPoints (const btTransform& xformRay,
|
||||||
const btTransform xformB,
|
const btTransform& xformB,
|
||||||
const int shapeType,
|
const int shapeType,
|
||||||
const void* shape,
|
const void* shape,
|
||||||
SpuConvexPolyhedronVertexData* convexVertexData,
|
SpuConvexPolyhedronVertexData* convexVertexData,
|
||||||
|
|||||||
@@ -3,19 +3,30 @@ INCLUDE_DIRECTORIES(
|
|||||||
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(LibBulletSoftBody
|
SET(LibBulletSoftBody_SRCS
|
||||||
btSoftBody.cpp
|
btSoftBody.cpp
|
||||||
btSoftBody.h
|
|
||||||
btSoftBodyHelpers.cpp
|
btSoftBodyHelpers.cpp
|
||||||
btSparseSDF.h
|
|
||||||
btSoftBodyHelpers.h
|
|
||||||
btSoftBodyRigidBodyCollisionConfiguration.cpp
|
btSoftBodyRigidBodyCollisionConfiguration.cpp
|
||||||
btSoftRigidCollisionAlgorithm.cpp
|
btSoftRigidCollisionAlgorithm.cpp
|
||||||
btSoftRigidCollisionAlgorithm.h
|
|
||||||
btSoftSoftCollisionAlgorithm.cpp
|
btSoftSoftCollisionAlgorithm.cpp
|
||||||
btSoftSoftCollisionAlgorithm.h
|
|
||||||
btSoftBodyConcaveCollisionAlgorithm.cpp
|
btSoftBodyConcaveCollisionAlgorithm.cpp
|
||||||
btSoftBodyConcaveCollisionAlgorithm.h
|
|
||||||
btSoftRigidDynamicsWorld.h
|
|
||||||
btSoftRigidDynamicsWorld.cpp
|
btSoftRigidDynamicsWorld.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SET(LibBulletSoftBody_HDRS
|
||||||
|
btSoftBody.h
|
||||||
|
btSparseSDF.h
|
||||||
|
btSoftBodyHelpers.h
|
||||||
|
btSoftRigidCollisionAlgorithm.h
|
||||||
|
btSoftSoftCollisionAlgorithm.h
|
||||||
|
btSoftBodyConcaveCollisionAlgorithm.h
|
||||||
|
btSoftRigidDynamicsWorld.h
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#ADD_LIBRARY(LibBulletSoftBody SHARED ${LibBulletSoftBody_SRCS} ${LibBulletSoftBody_HDRS})
|
||||||
|
ADD_LIBRARY(LibBulletSoftBody ${LibBulletSoftBody_SRCS} ${LibBulletSoftBody_HDRS})
|
||||||
|
|
||||||
|
INSTALL(TARGETS LibBulletSoftBody DESTINATION lib)
|
||||||
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||||
|
|
||||||
|
|||||||
@@ -3,3 +3,5 @@ SUBDIRS( BulletSoftBody BulletCollision BulletDynamics LinearMath )
|
|||||||
else (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
else (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||||
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
|
SUBDIRS( BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
|
||||||
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||||
|
|
||||||
|
INSTALL(FILES btBulletCollisionCommon.h btBulletDynamicsCommon.h Bullet-C-Api.h DESTINATION include)
|
||||||
@@ -3,7 +3,14 @@ INCLUDE_DIRECTORIES(
|
|||||||
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
${BULLET_PHYSICS_SOURCE_DIR}/src }
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_LIBRARY(LibLinearMath
|
SET(LibLinearMath_SRCS
|
||||||
|
btConvexHull.cpp
|
||||||
|
btQuickprof.cpp
|
||||||
|
btGeometryUtil.cpp
|
||||||
|
btAlignedAllocator.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LibLinearMath_HDRS
|
||||||
btAlignedObjectArray.h
|
btAlignedObjectArray.h
|
||||||
btList.h
|
btList.h
|
||||||
btPoolAllocator.h
|
btPoolAllocator.h
|
||||||
@@ -16,7 +23,6 @@ ADD_LIBRARY(LibLinearMath
|
|||||||
btScalar.h
|
btScalar.h
|
||||||
btAabbUtil2.h
|
btAabbUtil2.h
|
||||||
btConvexHull.h
|
btConvexHull.h
|
||||||
btConvexHull.cpp
|
|
||||||
btMinMax.h
|
btMinMax.h
|
||||||
btQuaternion.h
|
btQuaternion.h
|
||||||
btStackAlloc.h
|
btStackAlloc.h
|
||||||
@@ -27,8 +33,10 @@ ADD_LIBRARY(LibLinearMath
|
|||||||
btIDebugDraw.h
|
btIDebugDraw.h
|
||||||
btQuickprof.h
|
btQuickprof.h
|
||||||
btTransformUtil.h
|
btTransformUtil.h
|
||||||
btQuickprof.cpp
|
|
||||||
btGeometryUtil.cpp
|
|
||||||
btAlignedAllocator.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ADD_LIBRARY(LibLinearMath SHARED ${LibLinearMath_SRCS} ${LibLinearMath_HDRS})
|
||||||
|
ADD_LIBRARY(LibLinearMath ${LibLinearMath_SRCS} ${LibLinearMath_HDRS})
|
||||||
|
|
||||||
|
INSTALL(TARGETS LibLinearMath DESTINATION lib)
|
||||||
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
|
||||||
|
|||||||
@@ -293,18 +293,18 @@ class btMatrix3x3 {
|
|||||||
euler_out2.yaw = 0;
|
euler_out2.yaw = 0;
|
||||||
|
|
||||||
// From difference of angles formula
|
// From difference of angles formula
|
||||||
double delta = btAtan2(m_el[0].x(),m_el[0].z());
|
btScalar delta = btAtan2(m_el[0].x(),m_el[0].z());
|
||||||
if (m_el[2].x() > 0) //gimbal locked up
|
if (m_el[2].x() > 0) //gimbal locked up
|
||||||
{
|
{
|
||||||
euler_out.pitch = SIMD_PI / 2.0;
|
euler_out.pitch = SIMD_PI / btScalar(2.0);
|
||||||
euler_out2.pitch = SIMD_PI / 2.0;
|
euler_out2.pitch = SIMD_PI / btScalar(2.0);
|
||||||
euler_out.roll = euler_out.pitch + delta;
|
euler_out.roll = euler_out.pitch + delta;
|
||||||
euler_out2.roll = euler_out.pitch + delta;
|
euler_out2.roll = euler_out.pitch + delta;
|
||||||
}
|
}
|
||||||
else // gimbal locked down
|
else // gimbal locked down
|
||||||
{
|
{
|
||||||
euler_out.pitch = -SIMD_PI / 2.0;
|
euler_out.pitch = -SIMD_PI / btScalar(2.0);
|
||||||
euler_out2.pitch = -SIMD_PI / 2.0;
|
euler_out2.pitch = -SIMD_PI / btScalar(2.0);
|
||||||
euler_out.roll = -euler_out.pitch + delta;
|
euler_out.roll = -euler_out.pitch + delta;
|
||||||
euler_out2.roll = -euler_out.pitch + delta;
|
euler_out2.roll = -euler_out.pitch + delta;
|
||||||
}
|
}
|
||||||
@@ -314,32 +314,29 @@ class btMatrix3x3 {
|
|||||||
euler_out.pitch = - btAsin(m_el[2].x());
|
euler_out.pitch = - btAsin(m_el[2].x());
|
||||||
euler_out2.pitch = SIMD_PI - euler_out.pitch;
|
euler_out2.pitch = SIMD_PI - euler_out.pitch;
|
||||||
|
|
||||||
euler_out.roll = btAtan2(m_el[2].y()/cos(euler_out.pitch),
|
euler_out.roll = btAtan2(m_el[2].y()/btCos(euler_out.pitch),
|
||||||
m_el[2].z()/cos(euler_out.pitch));
|
m_el[2].z()/btCos(euler_out.pitch));
|
||||||
euler_out2.roll = btAtan2(m_el[2].y()/cos(euler_out2.pitch),
|
euler_out2.roll = btAtan2(m_el[2].y()/btCos(euler_out2.pitch),
|
||||||
m_el[2].z()/cos(euler_out2.pitch));
|
m_el[2].z()/btCos(euler_out2.pitch));
|
||||||
|
|
||||||
euler_out.yaw = btAtan2(m_el[1].x()/cos(euler_out.pitch),
|
euler_out.yaw = btAtan2(m_el[1].x()/btCos(euler_out.pitch),
|
||||||
m_el[0].x()/cos(euler_out.pitch));
|
m_el[0].x()/btCos(euler_out.pitch));
|
||||||
euler_out2.yaw = btAtan2(m_el[1].x()/cos(euler_out2.pitch),
|
euler_out2.yaw = btAtan2(m_el[1].x()/btCos(euler_out2.pitch),
|
||||||
m_el[0].x()/cos(euler_out2.pitch));
|
m_el[0].x()/btCos(euler_out2.pitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (solution_number == 1)
|
if (solution_number == 1)
|
||||||
{ yaw = euler_out.yaw;
|
{
|
||||||
pitch = euler_out.pitch;
|
yaw = euler_out.yaw;
|
||||||
roll = euler_out.roll;
|
pitch = euler_out.pitch;
|
||||||
|
roll = euler_out.roll;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ yaw = euler_out2.yaw;
|
{
|
||||||
pitch = euler_out2.pitch;
|
yaw = euler_out2.yaw;
|
||||||
roll = euler_out2.roll;
|
pitch = euler_out2.pitch;
|
||||||
|
roll = euler_out2.roll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@brief Create a scaled copy of the matrix
|
/**@brief Create a scaled copy of the matrix
|
||||||
|
|||||||
Reference in New Issue
Block a user