Skip to content

Commit

Permalink
[GJK] Remove detection of loop that made the algorithm fail to detect…
Browse files Browse the repository at this point in the history
… collision.

  - remove unused variable.
  • Loading branch information
florent-lamiraux committed Dec 6, 2018
1 parent 0d13474 commit aadec3c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/narrowphase/gjk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,7 @@ GJK::Status GJK::evaluate(const MinkowskiDiff& shape_, const Vec3f& guess)

// check B: when the new support point is close to previous support points, stop (as the new simplex is degenerated)
const Vec3f& w = curr_simplex.vertex[curr_simplex.rank - 1]->w;
bool found = false;
for(size_t i = 0; i < 4; ++i)
{
if((w - lastw[i]).squaredNorm() < tolerance * tolerance)
{
found = true; break;
}
}

if(false /*found*/)
{
removeVertex(simplices[current]);
break;
}
else
{
lastw[clastw = (clastw+1)&3] = w;
}
lastw[clastw = (clastw+1)&3] = w;

// check C: when the new support point is close to the sub-simplex where the ray point lies, stop (as the new simplex again is degenerated)
FCL_REAL omega = ray.dot(w) / rl;
Expand Down

0 comments on commit aadec3c

Please sign in to comment.