Commit 0eefca6e authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[GJK] Add inflation to box support function.

parent f9167f4b
......@@ -120,7 +120,8 @@ void getShapeSupport(const TriangleP* triangle, const Vec3f& dir, Vec3f& support
inline void getShapeSupport(const Box* box, const Vec3f& dir, Vec3f& support)
{
support.noalias() = (dir.array() > 0).select(box->halfSide, -box->halfSide);
const FCL_REAL inflate = (dir.array() == 0).any() ? 1.00000001 : 1.;
support.noalias() = (dir.array() > 0).select(inflate * box->halfSide, -inflate * box->halfSide);
}
inline void getShapeSupport(const Sphere*, const Vec3f& /*dir*/, Vec3f& support)
......
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