diff options
Diffstat (limited to 'PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp')
| -rw-r--r-- | PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp b/PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp index e295ca78..53c3dcfe 100644 --- a/PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp +++ b/PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp @@ -461,9 +461,7 @@ void BroadPhaseSap::update(const PxU32 numCpuTasks, PxcScratchAllocator* scratch if(narrowPhaseUnblockTask) narrowPhaseUnblockTask->removeReference(); - const bool success = setUpdateData(updateData); - - if(success) + if(setUpdateData(updateData)) { mScratchAllocator = scratchAllocator; @@ -483,6 +481,21 @@ void BroadPhaseSap::update(const PxU32 numCpuTasks, PxcScratchAllocator* scratch } } +void BroadPhaseSap::singleThreadedUpdate(PxcScratchAllocator* scratchAllocator, const BroadPhaseUpdateData& updateData) +{ +#if PX_CHECKED + PX_CHECK_AND_RETURN(scratchAllocator, "BroadPhaseSap::singleThreadedUpdate - scratchAllocator must be non-NULL \n"); +#endif + + if(setUpdateData(updateData)) + { + mScratchAllocator = scratchAllocator; + resizeBuffers(); + update(); + postUpdate(); + } +} + bool BroadPhaseSap::setUpdateData(const BroadPhaseUpdateData& updateData) { PX_ASSERT(0==mCreatedPairsSize); |