Sync bullet to 3.08 [ci build]

This commit is contained in:
halx99 2020-12-24 16:17:15 +08:00
parent ddb03ca44e
commit b9cc48d9f1
6 changed files with 12 additions and 5 deletions

2
external/README.md vendored
View File

@ -16,7 +16,7 @@
## Bullet
- Upstream: https://github.com/bulletphysics/bullet3
- Version: 3.07
- Version: 3.08
- License: zlib
## c-ares

View File

@ -125,7 +125,8 @@ btMultiBody::btMultiBody(int n_links,
m_posVarCnt(0),
m_useRK4(false),
m_useGlobalVelocities(false),
m_internalNeedsJointFeedback(false)
m_internalNeedsJointFeedback(false),
m_kinematic_calculate_velocity(false)
{
m_cachedInertiaTopLeft.setValue(0, 0, 0, 0, 0, 0, 0, 0, 0);
m_cachedInertiaTopRight.setValue(0, 0, 0, 0, 0, 0, 0, 0, 0);
@ -2381,7 +2382,7 @@ const char *btMultiBody::serialize(void *dataBuffer, class btSerializer *seriali
void btMultiBody::saveKinematicState(btScalar timeStep)
{
//todo: clamp to some (user definable) safe minimum timestep, to limit maximum angular/linear velocities
if (timeStep != btScalar(0.))
if (m_kinematic_calculate_velocity && timeStep != btScalar(0.))
{
btVector3 linearVelocity, angularVelocity;
btTransformUtil::calculateVelocity(getInterpolateBaseWorldTransform(), getBaseWorldTransform(), timeStep, linearVelocity, angularVelocity);

View File

@ -823,6 +823,9 @@ private:
///the m_needsJointFeedback gets updated/computed during the stepVelocitiesMultiDof and it for internal usage only
bool m_internalNeedsJointFeedback;
//If enabled, calculate the velocity based on kinematic transform changes. Currently only implemented for the base.
bool m_kinematic_calculate_velocity;
};
struct btMultiBodyLinkDoubleData

View File

@ -720,6 +720,9 @@ void btLeaveProfileZoneDefault()
#define BT_HAVE_TLS 1
#elif __linux__
#define BT_HAVE_TLS 1
#elif defined(__FreeBSD__) || defined(__NetBSD__)
// TODO: At the moment disabling purposely OpenBSD, albeit tls support exists but not fully functioning
#define BT_HAVE_TLS 1
#endif
// __thread is broken on Andorid clang until r12b. See

View File

@ -25,7 +25,7 @@ subject to the following restrictions:
#include <float.h>
/* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/
#define BT_BULLET_VERSION 305
#define BT_BULLET_VERSION 307
inline int btGetVersion()
{

View File

@ -481,7 +481,7 @@ public:
buffer[9] = '3';
buffer[10] = '0';
buffer[11] = '5';
buffer[11] = '8';
}
virtual void startSerialization()