aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp
diff options
context:
space:
mode:
authorSheikh Dawood <[email protected]>2018-08-13 13:37:04 -0500
committerSheikh Dawood <[email protected]>2018-08-13 13:37:04 -0500
commit3f9977d72f8a481e76b6ad643a3d312a8cf9b551 (patch)
tree8dfa563cf2a06498b56b055af133bd066f1f349c /PhysX_3.4/Source/GeomUtils/src/gjk/GuEPA.cpp
parentPhysX 3.4, APEX 1.4 patch release @24214033 (diff)
downloadphysx-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.cpp6
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;