aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
committerSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
commitd1c812f1162e5fdb13c215792725b2591d7428f5 (patch)
tree407056c45c7e9320c48fca6a3697d81a061c4ea0 /PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp
parentPhysX 3.4, APEX 1.4 patch release @22121272 (diff)
downloadphysx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.tar.xz
physx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.zip
PhysX 3.4.1, APEX 1.4.1 Release @22845541v3.4.1
Diffstat (limited to 'PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp')
-rw-r--r--PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp
index ca8f9028..ea12eb4e 100644
--- a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp
+++ b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexMesh.cpp
@@ -192,19 +192,15 @@ bool Gu::pcmContactConvexMesh(GU_CONTACT_METHOD_ARGS)
PxBounds3 hullAABB;
PolygonalData polyData;
const bool idtScaleConvex = getPCMConvexData(shape0, convexScaling, hullAABB, polyData);
-
- const Vec3V vScale = V3LoadU_SafeReadW(shapeConvex.scale.scale); // PT: safe because 'rotation' follows 'scale' in PxMeshScale
- const FloatV convexMargin = CalculatePCMConvexMargin(hullData, vScale);
const QuatV vQuat = QuatVLoadU(&shapeConvex.scale.rotation.x);
- const FloatV epsilon = FLoad(GU_PCM_MESH_MANIFOLD_EPSILON);
- const FloatV toleranceLength = FLoad(params.mToleranceLength);
- const FloatV toleranceMargin = FMul(epsilon, toleranceLength);
- const FloatV minMargin = FMin(convexMargin, toleranceMargin);
+ const Vec3V vScale = V3LoadU_SafeReadW(shapeConvex.scale.scale); // PT: safe because 'rotation' follows 'scale' in PxMeshScale
+
+ const PxReal toleranceScale = params.mToleranceLength;
+ const FloatV minMargin = CalculatePCMConvexMargin(hullData, vScale, toleranceScale, GU_PCM_MESH_MANIFOLD_EPSILON);
ConvexHullV convexHull(hullData, V3Zero(), vScale, vQuat, idtScaleConvex);
-
if(idtScaleConvex)
{
SupportLocalImpl<Gu::ConvexHullNoScaleV> convexMap(static_cast<ConvexHullNoScaleV&>(convexHull), convexTransform, convexHull.vertex2Shape, convexHull.shape2Vertex, true);
@@ -240,11 +236,8 @@ bool Gu::pcmContactBoxMesh(GU_CONTACT_METHOD_ARGS)
Cm::FastVertex2ShapeScaling idtScaling;
const Vec3V boxExtents = V3LoadU(shapeBox.halfExtents);
- const FloatV boxMargin = Gu::CalculatePCMBoxMargin(boxExtents);
- const FloatV epsilon = FLoad(GU_PCM_MESH_MANIFOLD_EPSILON);
- const FloatV toleranceLength = FLoad(params.mToleranceLength);
- const FloatV toleranceMargin = FMul(epsilon, toleranceLength);
- const FloatV minMargin = FMin(boxMargin, toleranceMargin);
+ const PxReal toleranceLength = params.mToleranceLength;
+ const FloatV minMargin = Gu::CalculatePCMBoxMargin(boxExtents, toleranceLength, GU_PCM_MESH_MANIFOLD_EPSILON);
BoxV boxV(V3Zero(), boxExtents);