From ed047261f06f814eeb88a1f6ee2dd8abd7a14034 Mon Sep 17 00:00:00 2001 From: AndreaCatania Date: Tue, 1 Aug 2017 14:30:58 +0200 Subject: Vendor thirdparty Bullet source for upcoming physics server backend --- .../src/BulletInverseDynamics/IDConfigBuiltin.hpp | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 thirdparty/bullet/src/BulletInverseDynamics/IDConfigBuiltin.hpp (limited to 'thirdparty/bullet/src/BulletInverseDynamics/IDConfigBuiltin.hpp') diff --git a/thirdparty/bullet/src/BulletInverseDynamics/IDConfigBuiltin.hpp b/thirdparty/bullet/src/BulletInverseDynamics/IDConfigBuiltin.hpp new file mode 100644 index 0000000000..130c19c6d6 --- /dev/null +++ b/thirdparty/bullet/src/BulletInverseDynamics/IDConfigBuiltin.hpp @@ -0,0 +1,37 @@ +///@file Configuration for Inverse Dynamics Library without external dependencies +#ifndef INVDYNCONFIG_BUILTIN_HPP_ +#define INVDYNCONFIG_BUILTIN_HPP_ +#define btInverseDynamics btInverseDynamicsBuiltin +#ifdef BT_USE_DOUBLE_PRECISION +// choose double/single precision version +typedef double idScalar; +#else +typedef float idScalar; +#endif +// use std::vector for arrays +#include +// this is to make it work with C++2003, otherwise we could do this +// template +// using idArray = std::vector; +template +struct idArray { + typedef std::vector type; +}; +typedef std::vector::size_type idArrayIdx; +// default to standard malloc/free +#include +#define idMalloc ::malloc +#define idFree ::free +// currently not aligned at all... +#define ID_DECLARE_ALIGNED_ALLOCATOR() \ + inline void* operator new(std::size_t sizeInBytes) { return idMalloc(sizeInBytes); } \ + inline void operator delete(void* ptr) { idFree(ptr); } \ + inline void* operator new(std::size_t, void* ptr) { return ptr; } \ + inline void operator delete(void*, void*) {} \ + inline void* operator new[](std::size_t sizeInBytes) { return idMalloc(sizeInBytes); } \ + inline void operator delete[](void* ptr) { idFree(ptr); } \ + inline void* operator new[](std::size_t, void* ptr) { return ptr; } \ + inline void operator delete[](void*, void*) {} + +#include "details/IDMatVec.hpp" +#endif -- cgit v1.2.3