mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-05 15:21:06 +00:00
enable v-hacd in cmake for BulletRobotics and pybullet build (use cmake -DENABLE_VHACD=OFF .. to disable)
cmake: enable stable PD plugin (-DDSTATIC_LINK_SPD_PLUGIN) btMultibody, make some args const in mulMatrix
This commit is contained in:
parent
97add36b9f
commit
adcaa75777
@ -30,6 +30,8 @@ OPTION(BUILD_SHARED_LIBS "Use shared libraries" OFF)
|
||||
OPTION(USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD "Use btSoftMultiBodyDynamicsWorld" ON)
|
||||
OPTION(USE_OPENVR "Use OpenVR for virtual reality" OFF)
|
||||
|
||||
OPTION(ENABLE_VHACD "Use VHACD in BulletRobotics and pybullet" ON)
|
||||
|
||||
OPTION(BULLET2_MULTITHREADING "Build Bullet 2 libraries with mutex locking around certain operations (required for multi-threading)" OFF)
|
||||
IF (BULLET2_MULTITHREADING)
|
||||
OPTION(BULLET2_USE_OPEN_MP_MULTITHREADING "Build Bullet 2 with support for multi-threading with OpenMP (requires a compiler with OpenMP support)" OFF)
|
||||
|
@ -7,6 +7,9 @@ INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src
|
||||
)
|
||||
ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN)
|
||||
|
||||
|
||||
|
||||
SET(BulletRobotics_INCLUDES
|
||||
../../examples/CommonInterfaces/Common2dCanvasInterface.h
|
||||
@ -156,8 +159,26 @@ SET(BulletRobotics_SRCS ${BulletRobotics_INCLUDES}
|
||||
../../examples/MultiThreading/b3PosixThreadSupport.cpp
|
||||
../../examples/MultiThreading/b3Win32ThreadSupport.cpp
|
||||
../../examples/MultiThreading/b3ThreadSupportInterface.cpp
|
||||
|
||||
|
||||
)
|
||||
|
||||
IF(ENABLE_VHACD)
|
||||
ADD_DEFINITIONS(-DBT_ENABLE_VHACD)
|
||||
SET(BulletRobotics_SRCS ${BulletRobotics_SRCS}
|
||||
../../Extras/VHACD/test/src/main_vhacd.cpp
|
||||
../../Extras/VHACD/src/VHACD.cpp
|
||||
../../Extras/VHACD/src/vhacdICHull.cpp
|
||||
../../Extras/VHACD/src/vhacdManifoldMesh.cpp
|
||||
../../Extras/VHACD/src/vhacdMesh.cpp
|
||||
../../Extras/VHACD/src/vhacdVolume.cpp
|
||||
)
|
||||
INCLUDE_DIRECTORIES(
|
||||
../../Extras/VHACD/inc
|
||||
../../Extras/VHACD/public
|
||||
)
|
||||
ENDIF(ENABLE_VHACD)
|
||||
|
||||
IF(BUILD_CLSOCKET)
|
||||
ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET)
|
||||
ENDIF(BUILD_CLSOCKET)
|
||||
|
@ -13,15 +13,19 @@ IF(BUILD_PYBULLET_NUMPY)
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN)
|
||||
ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN )
|
||||
|
||||
SET(pybullet3_SRCS
|
||||
pybullet.c
|
||||
)
|
||||
IF(ENABLE_VHACD)
|
||||
ADD_DEFINITIONS(-DBT_ENABLE_VHACD)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
../../Extras/VHACD/inc
|
||||
../../Extras/VHACD/public
|
||||
)
|
||||
ENDIF(ENABLE_VHACD)
|
||||
|
||||
SET(pybullet_SRCS
|
||||
pybullet.c
|
||||
|
||||
)
|
||||
|
||||
IF(BUILD_CLSOCKET)
|
||||
|
@ -1411,7 +1411,7 @@ void btMultiBody::solveImatrix(const btSpatialForceVector &rhs, btSpatialMotionV
|
||||
}
|
||||
}
|
||||
|
||||
void btMultiBody::mulMatrix(btScalar *pA, btScalar *pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const
|
||||
void btMultiBody::mulMatrix(const btScalar *pA, const btScalar *pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const
|
||||
{
|
||||
for (int row = 0; row < rowsA; row++)
|
||||
{
|
||||
|
@ -745,7 +745,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void mulMatrix(btScalar * pA, btScalar * pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const;
|
||||
void mulMatrix(const btScalar *pA, const btScalar *pB, int rowsA, int colsA, int rowsB, int colsB, btScalar *pC) const;
|
||||
|
||||
private:
|
||||
btMultiBodyLinkCollider *m_baseCollider; //can be NULL
|
||||
|
Loading…
Reference in New Issue
Block a user