24 const M shape =
V(9, 4, 1).asDiagonal();
25 check(!
overlap(
V(6.1, 0, 0), shape, shape),
"Separated ellipsoids rejected");
26 check(
overlap(
V(5.9, 0, 0), shape, shape),
"Overlapping ellipsoids missed");
27 check(!
overlap(
V(0, 0, 2.1), shape, shape),
"Thin-direction gap rejected");
30 const M rotation = Eigen::AngleAxisd(.7,
V(1, 2, 3).normalized()).toRotationMatrix();
31 check(!
overlap(rotation *
V(6.1, 0, 0), rotation * shape * rotation.transpose(),
32 rotation * shape * rotation.transpose()),
33 "Rotation changed separation");
34 check(!
overlap(
V(6.1e-8, 0, 0), shape * 1
e-16, shape * 1
e-16),
"Scaling changed separation");
37 "Triangle interior intersection missed");
42 std::cout <<
"PASS ellipsoid contact, rotations, scales, boundary triangles and degeneracies\n";
45 catch(
const std::exception &error)
47 std::cerr << error.what() <<
'\n';