use BT_ID_MAX as std::max is not portable (older Visual Studio versions break)
This commit is contained in:
@@ -79,7 +79,7 @@ int DillCreator::recurseDill(const int level, const int parent, const idScalar d
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
idScalar size = std::max(level, 1);
|
idScalar size = BT_ID_MAX(level, 1);
|
||||||
const int body = m_current_body;
|
const int body = m_current_body;
|
||||||
// length = 0.1 * size;
|
// length = 0.1 * size;
|
||||||
// with = 2 * 0.01 * size;
|
// with = 2 * 0.01 * size;
|
||||||
|
|||||||
@@ -28,12 +28,20 @@
|
|||||||
#ifndef btInverseDynamics
|
#ifndef btInverseDynamics
|
||||||
#error "custom inverse dynamics config, but no custom namespace defined"
|
#error "custom inverse dynamics config, but no custom namespace defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BT_ID_MAX(a,b) std::max(a,b)
|
||||||
|
#define BT_ID_MIN(a,b) std::min(a,b)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define btInverseDynamics btInverseDynamicsBullet3
|
#define btInverseDynamics btInverseDynamicsBullet3
|
||||||
// Use default configuration with bullet's types
|
// Use default configuration with bullet's types
|
||||||
// Use the same scalar type as rest of bullet library
|
// Use the same scalar type as rest of bullet library
|
||||||
#include "LinearMath/btScalar.h"
|
#include "LinearMath/btScalar.h"
|
||||||
typedef btScalar idScalar;
|
typedef btScalar idScalar;
|
||||||
|
#include "LinearMath/btMinMax.h"
|
||||||
|
#define BT_ID_MAX(a,b) btMax(a,b)
|
||||||
|
#define BT_ID_MIN(a,b) btMin(a,b)
|
||||||
|
|
||||||
#ifdef BT_USE_DOUBLE_PRECISION
|
#ifdef BT_USE_DOUBLE_PRECISION
|
||||||
#define BT_ID_USE_DOUBLE_PRECISION
|
#define BT_ID_USE_DOUBLE_PRECISION
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user