0.2.0-dev Download ZIP
177 lines ·5.5 KB Raw
| 1 | diff --git a/thirdparty/vhacd/inc/btAlignedAllocator.h b/thirdparty/vhacd/inc/btAlignedAllocator.h |
| 2 | index 11f6e12dca..8011595d89 100644 |
| 3 | --- a/thirdparty/vhacd/inc/btAlignedAllocator.h |
| 4 | +++ b/thirdparty/vhacd/inc/btAlignedAllocator.h |
| 5 | @@ -21,6 +21,9 @@ subject to the following restrictions: |
| 6 | ///that is better portable and more predictable |
| 7 | |
| 8 | #include "btScalar.h" |
| 9 | + |
| 10 | +namespace VHACD { |
| 11 | + |
| 12 | //#define BT_DEBUG_MEMORY_ALLOCATIONS 1 |
| 13 | #ifdef BT_DEBUG_MEMORY_ALLOCATIONS |
| 14 | |
| 15 | @@ -101,4 +104,6 @@ public: |
| 16 | friend bool operator==(const self_type&, const self_type&) { return true; } |
| 17 | }; |
| 18 | |
| 19 | +}; // namespace VHACD |
| 20 | + |
| 21 | #endif //BT_ALIGNED_ALLOCATOR |
| 22 | diff --git a/thirdparty/vhacd/inc/btAlignedObjectArray.h b/thirdparty/vhacd/inc/btAlignedObjectArray.h |
| 23 | index e6620adf6f..7446a8bfd9 100644 |
| 24 | --- a/thirdparty/vhacd/inc/btAlignedObjectArray.h |
| 25 | +++ b/thirdparty/vhacd/inc/btAlignedObjectArray.h |
| 26 | @@ -38,6 +38,8 @@ subject to the following restrictions: |
| 27 | #include <new> //for placement new |
| 28 | #endif //BT_USE_PLACEMENT_NEW |
| 29 | |
| 30 | +namespace VHACD { |
| 31 | + |
| 32 | ///The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods |
| 33 | ///It is developed to replace stl::vector to avoid portability issues, including STL alignment issues to add SIMD/SSE data |
| 34 | template <typename T> |
| 35 | @@ -445,4 +447,6 @@ public: |
| 36 | } |
| 37 | }; |
| 38 | |
| 39 | +}; // namespace VHACD |
| 40 | + |
| 41 | #endif //BT_OBJECT_ARRAY__ |
| 42 | diff --git a/thirdparty/vhacd/inc/btConvexHullComputer.h b/thirdparty/vhacd/inc/btConvexHullComputer.h |
| 43 | index 3c5075c2cb..194917cdec 100644 |
| 44 | --- a/thirdparty/vhacd/inc/btConvexHullComputer.h |
| 45 | +++ b/thirdparty/vhacd/inc/btConvexHullComputer.h |
| 46 | @@ -18,6 +18,8 @@ subject to the following restrictions: |
| 47 | #include "btAlignedObjectArray.h" |
| 48 | #include "btVector3.h" |
| 49 | |
| 50 | +namespace VHACD { |
| 51 | + |
| 52 | /// Convex hull implementation based on Preparata and Hong |
| 53 | /// See http://code.google.com/p/bullet/issues/detail?id=275 |
| 54 | /// Ole Kniemeyer, MAXON Computer GmbH |
| 55 | @@ -94,4 +96,6 @@ public: |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | +}; // namespace VHACD |
| 60 | + |
| 61 | #endif //BT_CONVEX_HULL_COMPUTER_H |
| 62 | diff --git a/thirdparty/vhacd/inc/btMinMax.h b/thirdparty/vhacd/inc/btMinMax.h |
| 63 | index 40b0ceb6ed..12aaeda9c4 100644 |
| 64 | --- a/thirdparty/vhacd/inc/btMinMax.h |
| 65 | +++ b/thirdparty/vhacd/inc/btMinMax.h |
| 66 | @@ -17,6 +17,8 @@ subject to the following restrictions: |
| 67 | |
| 68 | #include "btScalar.h" |
| 69 | |
| 70 | +namespace VHACD { |
| 71 | + |
| 72 | template <class T> |
| 73 | SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) |
| 74 | { |
| 75 | @@ -62,4 +64,6 @@ SIMD_FORCE_INLINE void btClamp(T& a, const T& lb, const T& ub) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | +}; // namespace VHACD |
| 80 | + |
| 81 | #endif //BT_GEN_MINMAX_H |
| 82 | diff --git a/thirdparty/vhacd/inc/btScalar.h b/thirdparty/vhacd/inc/btScalar.h |
| 83 | index b814474bdf..404bcbcfe1 100644 |
| 84 | --- a/thirdparty/vhacd/inc/btScalar.h |
| 85 | +++ b/thirdparty/vhacd/inc/btScalar.h |
| 86 | @@ -28,11 +28,15 @@ subject to the following restrictions: |
| 87 | /* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/ |
| 88 | #define BT_BULLET_VERSION 279 |
| 89 | |
| 90 | +namespace VHACD { |
| 91 | + |
| 92 | inline int32_t btGetVersion() |
| 93 | { |
| 94 | return BT_BULLET_VERSION; |
| 95 | } |
| 96 | |
| 97 | +}; // namespace VHACD |
| 98 | + |
| 99 | #if defined(DEBUG) || defined(_DEBUG) |
| 100 | #define BT_DEBUG |
| 101 | #endif |
| 102 | @@ -199,6 +203,8 @@ inline int32_t btGetVersion() |
| 103 | #endif //__CELLOS_LV2__ |
| 104 | #endif |
| 105 | |
| 106 | +namespace VHACD { |
| 107 | + |
| 108 | ///The btScalar type abstracts floating point numbers, to easily switch between double and single floating point precision. |
| 109 | #if defined(BT_USE_DOUBLE_PRECISION) |
| 110 | typedef double btScalar; |
| 111 | @@ -530,4 +536,7 @@ struct btTypedObject { |
| 112 | return m_objectType; |
| 113 | } |
| 114 | }; |
| 115 | + |
| 116 | +}; // namespace VHACD |
| 117 | + |
| 118 | #endif //BT_SCALAR_H |
| 119 | diff --git a/thirdparty/vhacd/inc/btVector3.h b/thirdparty/vhacd/inc/btVector3.h |
| 120 | index 0f2fefbbd5..356a6a9cfc 100644 |
| 121 | --- a/thirdparty/vhacd/inc/btVector3.h |
| 122 | +++ b/thirdparty/vhacd/inc/btVector3.h |
| 123 | @@ -26,6 +26,8 @@ subject to the following restrictions: |
| 124 | #define btVector3DataName "btVector3FloatData" |
| 125 | #endif //BT_USE_DOUBLE_PRECISION |
| 126 | |
| 127 | +namespace VHACD { |
| 128 | + |
| 129 | /**@brief btVector3 can be used to represent 3D points and vectors. |
| 130 | * It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user |
| 131 | * Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers |
| 132 | @@ -712,4 +714,6 @@ SIMD_FORCE_INLINE void btVector3::deSerialize(const struct btVector3Data& dataIn |
| 133 | m_floats[i] = dataIn.m_floats[i]; |
| 134 | } |
| 135 | |
| 136 | +}; // namespace VHACD |
| 137 | + |
| 138 | #endif //BT_VECTOR3_H |
| 139 | diff --git a/thirdparty/vhacd/src/btAlignedAllocator.cpp b/thirdparty/vhacd/src/btAlignedAllocator.cpp |
| 140 | index 11d594f6c9..bbb8baa107 100644 |
| 141 | --- a/thirdparty/vhacd/src/btAlignedAllocator.cpp |
| 142 | +++ b/thirdparty/vhacd/src/btAlignedAllocator.cpp |
| 143 | @@ -15,6 +15,8 @@ subject to the following restrictions: |
| 144 | |
| 145 | #include "btAlignedAllocator.h" |
| 146 | |
| 147 | +namespace VHACD { |
| 148 | + |
| 149 | #ifdef _MSC_VER |
| 150 | #pragma warning(disable:4311 4302) |
| 151 | #endif |
| 152 | @@ -177,4 +179,6 @@ void btAlignedFreeInternal(void* ptr) |
| 153 | sAlignedFreeFunc(ptr); |
| 154 | } |
| 155 | |
| 156 | +}; // namespace VHACD |
| 157 | + |
| 158 | #endif //BT_DEBUG_MEMORY_ALLOCATIONS |
| 159 | diff --git a/thirdparty/vhacd/src/btConvexHullComputer.cpp b/thirdparty/vhacd/src/btConvexHullComputer.cpp |
| 160 | index d3d749adbe..4f224c8360 100644 |
| 161 | --- a/thirdparty/vhacd/src/btConvexHullComputer.cpp |
| 162 | +++ b/thirdparty/vhacd/src/btConvexHullComputer.cpp |
| 163 | @@ -49,6 +49,8 @@ typedef unsigned long long int32_t uint64_t; |
| 164 | #include <stdio.h> |
| 165 | #endif |
| 166 | |
| 167 | +namespace VHACD { |
| 168 | + |
| 169 | // Convex hull implementation based on Preparata and Hong |
| 170 | // Ole Kniemeyer, MAXON Computer GmbH |
| 171 | class btConvexHullInternal { |
| 172 | @@ -2477,3 +2479,5 @@ btScalar btConvexHullComputer::compute(const void* coords, bool doubleCoords, in |
| 173 | |
| 174 | return shift; |
| 175 | } |
| 176 | + |
| 177 | +}; // namespace VHACD |