Skip to content

Commit

Permalink
Check the result in triangle_vertex_touches_triangle_edge_epa
Browse files Browse the repository at this point in the history
  • Loading branch information
wlinna committed Sep 18, 2024
1 parent 22a65a8 commit 16d414b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/parry3d/tests/geometry/epa3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ fn triangle_vertex_touches_triangle_edge_epa() {
None,
);

assert!(!matches!(gjk_result, query::gjk::GJKResult::NoIntersection(_)),
"PARTIAL SUCCESS: contact_support_map_support_map_with_params did not crash but did not produce the desired result");
let query::gjk::GJKResult::ClosestPoints(a, _b, _normal) = &gjk_result else {
panic!("PARTIAL SUCCESS: contact_support_map_support_map_with_params did not crash but did not produce the desired result");
};

// The upper triangle (mesh1) lines on plane where y = 1
assert_abs_diff_eq!(a.y, 1.0, epsilon = 0.001);
// The bottom triangle touches the upper triangle in one point where x = -2.349647.
assert_abs_diff_eq!(a.x, -2.349647, epsilon = 0.001);
}

0 comments on commit 16d414b

Please sign in to comment.