diff options
| author | Sheikh Dawood <[email protected]> | 2018-08-13 13:37:04 -0500 |
|---|---|---|
| committer | Sheikh Dawood <[email protected]> | 2018-08-13 13:37:04 -0500 |
| commit | 3f9977d72f8a481e76b6ad643a3d312a8cf9b551 (patch) | |
| tree | 8dfa563cf2a06498b56b055af133bd066f1f349c /PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp | |
| parent | PhysX 3.4, APEX 1.4 patch release @24214033 (diff) | |
| download | physx-3.4-3f9977d72f8a481e76b6ad643a3d312a8cf9b551.tar.xz physx-3.4-3f9977d72f8a481e76b6ad643a3d312a8cf9b551.zip | |
PhysX 3.4, APEX 1.4 patch release @24698370
Diffstat (limited to 'PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp')
| -rw-r--r-- | PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp b/PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp index 5dfef1cd..066fd3ae 100644 --- a/PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp +++ b/PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp @@ -288,7 +288,8 @@ namespace Gu { //ML: facet isn't visible from w (we don't have a reflex edge), this facet will be on the boundary and part of the new polytope so that //we will push it into our edgeBuffer - edgeBuffer.Insert(f, index); + if(!edgeBuffer.Insert(f, index)) + return; } else { @@ -622,7 +623,8 @@ namespace Gu facet->silhouette(q, aBuf, bBuf, edgeBuffer, facetManager); - if (edgeBuffer.IsEmpty()) + //the edge buffer either empty or overflow + if (!edgeBuffer.IsValid()) { calculateContactInformation(aBuf, bBuf, facet, a, b, pa, pb, normal, penDepth, takeCoreShape); return EPA_DEGENERATE; |