mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-05 15:21:06 +00:00
add BT_USE_INVERSE_DYNAMICS_WITH_BULLET2
This commit is contained in:
parent
71e411c2ca
commit
5144949ed8
@ -68,6 +68,10 @@ typedef btScalar idScalar;
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
#define BT_ID_USE_DOUBLE_PRECISION
|
||||
#endif
|
||||
|
||||
#ifndef BT_USE_INVERSE_DYNAMICS_WITH_BULLET2
|
||||
|
||||
|
||||
// use bullet types for arrays and array indices
|
||||
#include "Bullet3Common/b3AlignedObjectArray.h"
|
||||
// this is to make it work with C++2003, otherwise we could do this:
|
||||
@ -80,6 +84,19 @@ struct idArray {
|
||||
typedef int idArrayIdx;
|
||||
#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
|
||||
#define idMalloc btAllocFunc
|
||||
#define idFree btFreeFunc
|
||||
|
@ -5,7 +5,7 @@
|
||||
/// name of file being compiled, without leading path components
|
||||
#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"
|
||||
#define error_message(...) b3Error(__VA_ARGS__)
|
||||
#define warning_message(...) b3Warning(__VA_ARGS__)
|
||||
|
Loading…
Reference in New Issue
Block a user