From d1c812f1162e5fdb13c215792725b2591d7428f5 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Fri, 15 Sep 2017 15:41:57 -0500 Subject: PhysX 3.4.1, APEX 1.4.1 Release @22845541 --- PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp') diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp index 881c9218..95bd314d 100644 --- a/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp +++ b/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp @@ -1407,7 +1407,7 @@ namespace local if (dotP > maxdot_minang) { - if (face.area > oppFace.area) + if (face.area >= oppFace.area) { // check if we can merge the 2 faces merge = canMergeFaces(*hedge); @@ -2383,7 +2383,7 @@ void QuickHullConvexHullLib::fillConvexMeshDescFromQuickHull(PxConvexMeshDesc& d // allocate out buffers const PxU32 indicesBufferSize = sizeof(PxU32)*numIndices; - const PxU32 verticesBufferSize = sizeof(PxVec3)*mQuickHull->mNumVertices + 1; + const PxU32 verticesBufferSize = sizeof(PxVec3)*(mQuickHull->mNumVertices + 1); const PxU32 facesBufferSize = sizeof(PxHullPolygon)*numFacesOut; const PxU32 faceTranslationTableSize = sizeof(PxU16)*numFacesOut; const PxU32 translationTableSize = sizeof(PxU32)*mQuickHull->mNumVertices; @@ -2503,7 +2503,7 @@ void QuickHullConvexHullLib::fillConvexMeshDescFromCroppedHull(PxConvexMeshDesc& const PxU32 numVertices = mCropedConvexHull->getVertices().size(); const PxU32 indicesBufferSize = sizeof(PxU32)*numIndices; const PxU32 facesBufferSize = sizeof(PxHullPolygon)*numPolygons; - const PxU32 verticesBufferSize = sizeof(PxVec3)*numVertices + 1; // allocate additional vec3 for V4 safe load in VolumeInteration + const PxU32 verticesBufferSize = sizeof(PxVec3)*(numVertices + 1); // allocate additional vec3 for V4 safe load in VolumeInteration const PxU32 bufferMemorySize = indicesBufferSize + verticesBufferSize + facesBufferSize; mOutMemoryBuffer = reinterpret_cast(PX_ALLOC_TEMP(bufferMemorySize, "ConvexMeshDesc")); -- cgit v1.2.3