diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-09-15 15:41:57 -0500 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-09-15 15:41:57 -0500 |
| commit | d1c812f1162e5fdb13c215792725b2591d7428f5 (patch) | |
| tree | 407056c45c7e9320c48fca6a3697d81a061c4ea0 /PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h | |
| parent | PhysX 3.4, APEX 1.4 patch release @22121272 (diff) | |
| download | physx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.tar.xz physx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.zip | |
PhysX 3.4.1, APEX 1.4.1 Release @22845541v3.4.1
Diffstat (limited to 'PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h')
| -rw-r--r-- | PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h b/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h index f3e02835..89e231c8 100644 --- a/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h +++ b/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h @@ -135,6 +135,7 @@ namespace Bp PX_FORCE_INLINE void initEntry(PxU32 index) { + index++; // PT: always pretend we need one more entry, to make sure reading the last used entry will be SIMD-safe. const PxU32 oldCapacity = mBounds.capacity(); if(index>=oldCapacity) { @@ -150,7 +151,6 @@ namespace Bp mHasAnythingChanged = true; } - PX_FORCE_INLINE const PxBounds3& getBounds(PxU32 index) const { return mBounds[index]; @@ -178,7 +178,7 @@ namespace Bp return mBounds; } - PX_FORCE_INLINE PxU32 getCapacity() + PX_FORCE_INLINE PxU32 getCapacity() const { return mBounds.size(); } @@ -440,8 +440,8 @@ namespace Bp PX_FORCE_INLINE void initEntry(BoundsIndex index, PxReal contactDistance, PxU32 group, void* userData) { - if(index >= mVolumeData.size()) - reserveShapeSpace(index); + if((index+1) >= mVolumeData.size()) + reserveShapeSpace(index+1); // PT: TODO: why is this needed at all? Why aren't size() and capacity() enough? mUsedSize = PxMax(index+1, mUsedSize); |