Commit 22b391cf authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

[GJK] Fix GJKSolver_indep::shapeTriangleInteraction.

  If GJK returns fail, assume no collision.
  Fix computation of closest points.
parent 6f3ca783
Pipeline #2453 failed with stage
in 60 minutes and 22 seconds
......@@ -142,6 +142,7 @@ namespace fcl
break;
}
case details::GJK::Valid:
case details::GJK::Failed:
{
col = false;
Vec3f w0 (Vec3f::Zero()), w1 (Vec3f::Zero());
......@@ -152,8 +153,8 @@ namespace fcl
w1 += shape.support(-gjk.getSimplex()->vertex[i]->d, 1) * p;
}
distance = (w0 - w1).norm();
p1 = w0;
p2 = shape.toshape0.transform(w1);
p1 = tf1.transform (w0);
p2 = tf1.transform (w1);
assert (distance > 0);
}
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment