diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-09-15 15:41:57 -0500 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-09-15 15:41:57 -0500 |
| commit | d1c812f1162e5fdb13c215792725b2591d7428f5 (patch) | |
| tree | 407056c45c7e9320c48fca6a3697d81a061c4ea0 /PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp | |
| parent | PhysX 3.4, APEX 1.4 patch release @22121272 (diff) | |
| download | physx-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/GuPCMContactConvexHeightField.cpp')
| -rw-r--r-- | PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp index 8ba4e2d7..979d75be 100644 --- a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp +++ b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactConvexHeightField.cpp @@ -208,11 +208,9 @@ bool Gu::pcmContactConvexHeightField(GU_CONTACT_METHOD_ARGS) 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 = Gu::CalculatePCMConvexMargin(hullData, vScale); - 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 PxReal toleranceLength = params.mToleranceLength; + const FloatV minMargin = Gu::CalculatePCMConvexMargin(hullData, vScale, toleranceLength, GU_PCM_MESH_MANIFOLD_EPSILON); const QuatV vQuat = QuatVLoadU(&shapeConvex.scale.rotation.x); Gu::ConvexHullV convexHull(hullData, V3Zero(), vScale, vQuat, shapeConvex.scale.isIdentity()); @@ -249,12 +247,9 @@ bool Gu::pcmContactBoxHeightField(GU_CONTACT_METHOD_ARGS) const Vec3V p0 = V3LoadA(&transform0.p.x); 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 toranceLength = params.mToleranceLength; + const FloatV minMargin = Gu::CalculatePCMBoxMargin(boxExtents, toranceLength, GU_PCM_MESH_MANIFOLD_EPSILON); Gu::BoxV boxV(V3Zero(), boxExtents); |