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/LowLevelDynamics/src/DyContactPrepShared.h | |
| 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/LowLevelDynamics/src/DyContactPrepShared.h')
| -rw-r--r-- | PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrepShared.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrepShared.h b/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrepShared.h index 67ed680b..c973f1cf 100644 --- a/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrepShared.h +++ b/PhysX_3.4/Source/LowLevelDynamics/src/DyContactPrepShared.h @@ -234,7 +234,7 @@ private: const Vec3VArg normal, const FloatVArg norVel, const VecCrossV& norCross, const Vec3VArg angVel0, const Vec3VArg angVel1, const FloatVArg invDt, const FloatVArg invDtp8, const FloatVArg restDistance, const FloatVArg maxPenBias, const FloatVArg restitution, const FloatVArg bounceThreshold, const Gu::ContactPoint& contact, SolverContactPoint& solverContact, - const FloatVArg ccdMaxSeparation) + const FloatVArg ccdMaxSeparation, const Vec3VArg solverOffsetSlop) { const FloatV zero = FZero(); const Vec3V point = V3LoadA(contact.point); @@ -245,8 +245,14 @@ private: const Vec3V ra = V3Sub(point, bodyFrame0p); const Vec3V rb = V3Sub(point, bodyFrame1p); - const Vec3V raXn = V3Cross(ra, norCross); - const Vec3V rbXn = V3Cross(rb, norCross); + //ra = V3Sel(V3IsGrtr(solverOffsetSlop, V3Abs(ra)), V3Zero(), ra); + //rb = V3Sel(V3IsGrtr(solverOffsetSlop, V3Abs(rb)), V3Zero(), rb); + + Vec3V raXn = V3Cross(ra, norCross); + Vec3V rbXn = V3Cross(rb, norCross); + + raXn = V3Sel(V3IsGrtr(solverOffsetSlop, V3Abs(raXn)), V3Zero(), raXn); + rbXn = V3Sel(V3IsGrtr(solverOffsetSlop, V3Abs(rbXn)), V3Zero(), rbXn); const Vec3V raXnSqrtInertia = M33MulV3(invSqrtInertia0, raXn); const Vec3V rbXnSqrtInertia = M33MulV3(invSqrtInertia1, rbXn); |