aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp
diff options
context:
space:
mode:
authorsschirm <[email protected]>2016-12-23 14:20:36 +0100
committersschirm <[email protected]>2016-12-23 14:56:17 +0100
commitef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch)
tree710426e8daa605551ce3f34b581897011101c30f /PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp
parentInitial commit: (diff)
downloadphysx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz
physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp')
-rw-r--r--PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp b/PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp
index 37b5027b..5b33c71b 100644
--- a/PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp
+++ b/PhysX_3.4/Source/LowLevelAABB/src/BpSimpleAABBManager.cpp
@@ -1308,7 +1308,7 @@ void Aggregate::sortBounds()
{
Ps::Array<PxU32> copy = mAggregated;
InflatedAABB* boundsCopy = reinterpret_cast<InflatedAABB*>(PX_ALLOC(sizeof(InflatedAABB)*(nbObjects+1), "mInflatedBounds"));
- memcpy(boundsCopy, mInflatedBounds, (nbObjects+1)*sizeof(InflatedAABB));
+ PxMemCopy(boundsCopy, mInflatedBounds, (nbObjects+1)*sizeof(InflatedAABB));
const PxU32* Sorted = mRS.GetRanks();
for(PxU32 i=0;i<nbObjects;i++)
@@ -1832,11 +1832,14 @@ void SimpleAABBManager::handleOriginShift()
{
const AggregateHandle aggregateHandle = mVolumeData[i].getAggregate();
Aggregate* aggregate = getAggregateFromHandle(aggregateHandle);
- aggregate->markAsDirty(mDirtyAggregates);
- aggregate->allocateBounds();
- aggregate->computeBounds(mBoundsArray, mContactDistance.begin());
- mBoundsArray.begin()[aggregate->mIndex] = aggregate->mBounds;
- mUpdatedHandles.pushBack(i); // PT: TODO: BoundsIndex-to-ShapeHandle confusion here
+ if(aggregate->getNbAggregated())
+ {
+ aggregate->markAsDirty(mDirtyAggregates);
+ aggregate->allocateBounds();
+ aggregate->computeBounds(mBoundsArray, mContactDistance.begin());
+ mBoundsArray.begin()[aggregate->mIndex] = aggregate->mBounds;
+ mUpdatedHandles.pushBack(i); // PT: TODO: BoundsIndex-to-ShapeHandle confusion here
+ }
}
}
}