From b0f2dbadcd90f096ed49bf398f228608118d1401 Mon Sep 17 00:00:00 2001 From: "chappuis.daniel" Date: Mon, 19 Jul 2010 19:22:11 +0000 Subject: [PATCH] Correct the cutoff coefficient to 0.99 git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@353 92aac97c-a6ce-11dd-a772-7fcde58d38e6 --- sources/reactphysics3d/collision/SATAlgorithm.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/reactphysics3d/collision/SATAlgorithm.cpp b/sources/reactphysics3d/collision/SATAlgorithm.cpp index 78f9bbf3..90c1583e 100644 --- a/sources/reactphysics3d/collision/SATAlgorithm.cpp +++ b/sources/reactphysics3d/collision/SATAlgorithm.cpp @@ -26,7 +26,6 @@ #include #include #include -#include // TODO : Delete this // We want to use the ReactPhysics3D namespace using namespace reactphysics3d; @@ -88,7 +87,7 @@ bool SATAlgorithm::computeCollisionTest(const OBB* const obb1, const OBB* const // The contact normal point out of OBB1 toward OBB2 bool side; // True if the interval 1 is at the left of interval 2 if a collision occurs and false otherwise double minPenetrationDepth = DBL_MAX; // Minimum penetration depth detected among all separated axis - const double cutoff = 0.9; // Cutoff for cosine of angles between box axes + const double cutoff = 0.99; // Cutoff for cosine of angles between box axes bool existsParallelPair = false; // True if there exists two face normals that are parallel. // This is used because if a parallel pair exists, it is sufficient // to test only the face normals of the OBBs for separation. Two nearly @@ -100,7 +99,7 @@ bool SATAlgorithm::computeCollisionTest(const OBB* const obb1, const OBB* const double absC[3][3]; // absC[i][j] = abs(DotProduct(obb1.Ai, obb2.Bj)) double udc1[3]; // DotProduct(obb1.Ai, obb2.center - obb1.center) double udc2[3]; // DotProduct(obb2.Ai, obb2.center - obb1.center) - + Vector3D boxDistance = obb2->getCenter() - obb1->getCenter(); // Vector between the centers of the OBBs // Axis A0