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/GuPCMContactCapsuleConvex.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/GuPCMContactCapsuleConvex.cpp')
| -rw-r--r-- | PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactCapsuleConvex.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactCapsuleConvex.cpp b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactCapsuleConvex.cpp index 1daf1bd6..5079b32a 100644 --- a/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactCapsuleConvex.cpp +++ b/PhysX_3.4/Source/GeomUtils/src/pcm/GuPCMContactCapsuleConvex.cpp @@ -50,7 +50,7 @@ namespace Gu static bool fullContactsGenerationCapsuleConvex(const CapsuleV& capsule, const ConvexHullV& convexHull, const PsMatTransformV& aToB, const PsTransformV& transf0,const PsTransformV& transf1, PersistentContact* manifoldContacts, ContactBuffer& contactBuffer, const bool idtScale, PersistentContactManifold& manifold, Vec3VArg normal, - const Vec3VArg closest, const FloatVArg tolerance, const FloatVArg contactDist, const bool doOverlapTest, Cm::RenderOutput* renderOutput, const FloatVArg toleranceScale) + const Vec3VArg closest, const PxReal tolerance, const FloatVArg contactDist, const bool doOverlapTest, Cm::RenderOutput* renderOutput, const PxReal toleranceScale) { PX_UNUSED(renderOutput); @@ -122,8 +122,8 @@ bool pcmContactCapsuleConvex(GU_CONTACT_METHOD_ARGS) const PsTransformV curRTrans(transf1.transformInv(transf0)); const PsMatTransformV aToB(curRTrans); - - const FloatV convexMargin = Gu::CalculatePCMConvexMargin(hullData, vScale); + const PxReal toleranceLength = params.mToleranceLength ; + const FloatV convexMargin = Gu::CalculatePCMConvexMargin(hullData, vScale, toleranceLength); const FloatV capsuleMinMargin = Gu::CalculateCapsuleMinMargin(capsuleRadius); const FloatV minMargin = FMin(convexMargin, capsuleMinMargin); @@ -150,7 +150,7 @@ bool pcmContactCapsuleConvex(GU_CONTACT_METHOD_ARGS) manifold.setRelativeTransform(curRTrans); const QuatV vQuat = QuatVLoadU(&shapeConvex.scale.rotation.x); ConvexHullV convexHull(hullData, V3LoadU(hullData->mCenterOfMass), vScale, vQuat, idtScale); - convexHull.setMargin(zero); + convexHull.setMargin(0.f); //transform capsule(a) into the local space of convexHull(b) CapsuleV capsule(aToB.p, aToB.rotate(V3Scale(V3UnitX(), capsuleHalfHeight)), capsuleRadius); @@ -181,7 +181,7 @@ bool pcmContactCapsuleConvex(GU_CONTACT_METHOD_ARGS) else if(status == GJK_DEGENERATE) { return fullContactsGenerationCapsuleConvex(capsule, convexHull, aToB, transf0, transf1, manifoldContacts, contactBuffer, idtScale, manifold, normal, - closestB, convexHull.getMargin(), contactDist, true, renderOutput, FLoad(params.mToleranceLength)); + closestB, convexHull.getMarginF(), contactDist, true, renderOutput, params.mToleranceLength); } else { @@ -242,7 +242,7 @@ bool pcmContactCapsuleConvex(GU_CONTACT_METHOD_ARGS) if(initialContacts == 0 || bLostContacts || doOverlapTest) { return fullContactsGenerationCapsuleConvex(capsule, convexHull, aToB, transf0, transf1, manifoldContacts, contactBuffer, idtScale, manifold, normal, - closestB, convexHull.getMargin(), contactDist, doOverlapTest, renderOutput, FLoad(params.mToleranceLength)); + closestB, convexHull.getMarginF(), contactDist, doOverlapTest, renderOutput, params.mToleranceLength); } else { |