diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2018-09-25 11:33:48 -0500 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2018-09-25 11:33:48 -0500 |
| commit | ad993f2926db6fe4ba2c75e17c4f099d9d853038 (patch) | |
| tree | 426f831e7aa870a4704b8dd082538ff292e751f9 /PhysX_3.4/Source/LowLevelAABB/src/BpBroadPhaseSap.cpp | |
| parent | PhysX 3.4, APEX 1.4 patch release @24698370 (diff) | |
| download | physx-3.4-ad993f2926db6fe4ba2c75e17c4f099d9d853038.tar.xz physx-3.4-ad993f2926db6fe4ba2c75e17c4f099d9d853038.zip | |
PhysX 3.4, APEX 1.4 patch release @24990349
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); |