@@ -1085,7 +1085,7 @@ static ccd_vec3_t faceNormalPointingOutward(const ccd_pt_t* polytope,
1085
1085
}
1086
1086
1087
1087
// Return true if the point `pt` is on the outward side of the half-plane, on
1088
- // which the triangle `f1 lives. Notice if the point `pt` is exactly on the
1088
+ // which the triangle `f` lives. Notice if the point `pt` is exactly on the
1089
1089
// half-plane, the return is false.
1090
1090
// @param f A triangle on a polytope.
1091
1091
// @param pt A point.
@@ -1688,14 +1688,6 @@ static void validateNearestFeatureOfPolytopeBeingEdge(ccd_pt_t* polytope) {
1688
1688
std::array<ccd_vec3_t , 2 > face_normals;
1689
1689
std::array<double , 2 > origin_to_face_distance;
1690
1690
1691
- // We define the plane equation using vertex[0]. If vertex[0] is far away
1692
- // from the origin, it can magnify rounding error. We scale epsilon to account
1693
- // for this possibility.
1694
- const ccd_real_t v0_dist =
1695
- std::sqrt (ccdVec3Len2 (&nearest_edge->vertex [0 ]->v .v ));
1696
- const ccd_real_t plane_threshold =
1697
- kEps * std::max (static_cast <ccd_real_t >(1.0 ), v0_dist);
1698
-
1699
1691
for (int i = 0 ; i < 2 ; ++i) {
1700
1692
face_normals[i] =
1701
1693
faceNormalPointingOutward (polytope, nearest_edge->faces [i]);
@@ -1704,22 +1696,6 @@ static void validateNearestFeatureOfPolytopeBeingEdge(ccd_pt_t* polytope) {
1704
1696
// n̂ ⋅ (o - vₑ) ≤ 0 or, with simplification, -n̂ ⋅ vₑ ≤ 0 (since n̂ ⋅ o = 0).
1705
1697
origin_to_face_distance[i] =
1706
1698
-ccdVec3Dot (&face_normals[i], &nearest_edge->vertex [0 ]->v .v );
1707
- // If the origin lies *on* the edge, then it also lies on the two adjacent
1708
- // faces. Rather than failing on strictly *positive* signed distance, we
1709
- // introduce an epsilon threshold. This usage of epsilon is to account for a
1710
- // discrepancy in the signed distance computation. How GJK (and partially
1711
- // EPA) compute the signed distance from origin to face may *not* be exactly
1712
- // the same as done in this test (i.e. for a given set of vertices, the
1713
- // plane equation can be defined various ways. Those ways are
1714
- // *mathematically* equivalent but numerically will differ due to rounding).
1715
- // We account for those differences by allowing a very small positive signed
1716
- // distance to be considered zero. We assume that the GJK/EPA code
1717
- // ultimately classifies inside/outside around *zero* and *not* epsilon.
1718
- if (origin_to_face_distance[i] > plane_threshold) {
1719
- FCL_THROW_FAILED_AT_THIS_CONFIGURATION (
1720
- " The origin is outside of the polytope. This should already have "
1721
- " been identified as separating." );
1722
- }
1723
1699
}
1724
1700
1725
1701
// We know the reported squared distance to the edge. If that distance is
0 commit comments