* add BT_USE_INVERSE_DYNAMICS_WITH_BULLET2
This commit is contained in:
@@ -68,6 +68,10 @@ typedef btScalar idScalar;
|
|||||||
#ifdef BT_USE_DOUBLE_PRECISION
|
#ifdef BT_USE_DOUBLE_PRECISION
|
||||||
#define BT_ID_USE_DOUBLE_PRECISION
|
#define BT_ID_USE_DOUBLE_PRECISION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef BT_USE_INVERSE_DYNAMICS_WITH_BULLET2
|
||||||
|
|
||||||
|
|
||||||
// use bullet types for arrays and array indices
|
// use bullet types for arrays and array indices
|
||||||
#include "Bullet3Common/b3AlignedObjectArray.h"
|
#include "Bullet3Common/b3AlignedObjectArray.h"
|
||||||
// this is to make it work with C++2003, otherwise we could do this:
|
// this is to make it work with C++2003, otherwise we could do this:
|
||||||
@@ -80,6 +84,19 @@ struct idArray {
|
|||||||
typedef int idArrayIdx;
|
typedef int idArrayIdx;
|
||||||
#define ID_DECLARE_ALIGNED_ALLOCATOR() B3_DECLARE_ALIGNED_ALLOCATOR()
|
#define ID_DECLARE_ALIGNED_ALLOCATOR() B3_DECLARE_ALIGNED_ALLOCATOR()
|
||||||
|
|
||||||
|
#else // BT_USE_INVERSE_DYNAMICS_WITH_BULLET2
|
||||||
|
|
||||||
|
#include "LinearMath/btAlignedObjectArray.h"
|
||||||
|
template <typename T>
|
||||||
|
struct idArray {
|
||||||
|
typedef btAlignedObjectArray<T> type;
|
||||||
|
};
|
||||||
|
typedef int idArrayIdx;
|
||||||
|
#define ID_DECLARE_ALIGNED_ALLOCATOR() BT_DECLARE_ALIGNED_ALLOCATOR()
|
||||||
|
|
||||||
|
#endif // BT_USE_INVERSE_DYNAMICS_WITH_BULLET2
|
||||||
|
|
||||||
|
|
||||||
// use bullet's allocator functions
|
// use bullet's allocator functions
|
||||||
#define idMalloc btAllocFunc
|
#define idMalloc btAllocFunc
|
||||||
#define idFree btFreeFunc
|
#define idFree btFreeFunc
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/// name of file being compiled, without leading path components
|
/// name of file being compiled, without leading path components
|
||||||
#define __INVDYN_FILE_WO_DIR__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
#define __INVDYN_FILE_WO_DIR__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||||
|
|
||||||
#ifndef BT_ID_WO_BULLET
|
#if !defined(BT_ID_WO_BULLET) && !defined(BT_USE_INVERSE_DYNAMICS_WITH_BULLET2)
|
||||||
#include "Bullet3Common/b3Logging.h"
|
#include "Bullet3Common/b3Logging.h"
|
||||||
#define error_message(...) b3Error(__VA_ARGS__)
|
#define error_message(...) b3Error(__VA_ARGS__)
|
||||||
#define warning_message(...) b3Warning(__VA_ARGS__)
|
#define warning_message(...) b3Warning(__VA_ARGS__)
|
||||||
|
|||||||
Reference in New Issue
Block a user