diff options
author | Oussama <o.boukhelf@gmail.com> | 2019-01-03 14:26:51 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-07 12:30:35 +0100 |
commit | 22b7c9dfa80d0f7abca40f061865c2ab3c136a74 (patch) | |
tree | 311cd3f22b012329160f9d43810aea429994af48 /thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp | |
parent | a6722cf36251ddcb538e6ebed9fa4950342b68ba (diff) |
Update Bullet to the latest commit 126b676
Diffstat (limited to 'thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp')
-rw-r--r-- | thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp index b79f49d611..07629229ab 100644 --- a/thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp +++ b/thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp @@ -18,23 +18,21 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btConvexShape.h" #include "btGjkEpaPenetrationDepthSolver.h" - #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" bool btGjkEpaPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simplexSolver, - const btConvexShape* pConvexA, const btConvexShape* pConvexB, - const btTransform& transformA, const btTransform& transformB, - btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB, - class btIDebugDraw* debugDraw) + const btConvexShape* pConvexA, const btConvexShape* pConvexB, + const btTransform& transformA, const btTransform& transformB, + btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB, + class btIDebugDraw* debugDraw) { - (void)debugDraw; (void)v; (void)simplexSolver; btVector3 guessVectors[] = { - btVector3(transformB.getOrigin() - transformA.getOrigin()).normalized(), - btVector3(transformA.getOrigin() - transformB.getOrigin()).normalized(), + btVector3(transformB.getOrigin() - transformA.getOrigin()).safeNormalize(), + btVector3(transformA.getOrigin() - transformB.getOrigin()).safeNormalize(), btVector3(0, 0, 1), btVector3(0, 1, 0), btVector3(1, 0, 0), @@ -49,13 +47,13 @@ bool btGjkEpaPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simp for (int i = 0; i < numVectors; i++) { simplexSolver.reset(); - btVector3 guessVector = guessVectors[i]; + btVector3 guessVector = guessVectors[i]; - btGjkEpaSolver2::sResults results; + btGjkEpaSolver2::sResults results; if (btGjkEpaSolver2::Penetration(pConvexA, transformA, - pConvexB, transformB, - guessVector, results)) + pConvexB, transformB, + guessVector, results)) { wWitnessOnA = results.witnesses[0]; @@ -81,4 +79,3 @@ bool btGjkEpaPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simp v.setValue(0, 0, 0); return false; } - |