diff --git a/extern/typed-geometry b/extern/typed-geometry index b2642eb7a1630106a71bf50e46ba6599830e226b..05a25760acd58e2a87d3627a2f6d3d9f40ecc95e 160000 --- a/extern/typed-geometry +++ b/extern/typed-geometry @@ -1 +1 @@ -Subproject commit b2642eb7a1630106a71bf50e46ba6599830e226b +Subproject commit 05a25760acd58e2a87d3627a2f6d3d9f40ecc95e diff --git a/tests/feature/intersections/ray-intersect.cc b/tests/feature/intersections/ray-intersect.cc index fcae29da438a824298d4bb279fca8ad95fc09db9..0c79c41d12bbb7fd971b60b15704df3ea2122cb2 100644 --- a/tests/feature/intersections/ray-intersect.cc +++ b/tests/feature/intersections/ray-intersect.cc @@ -100,6 +100,7 @@ TG_FUZZ_TEST(TypedGeometry, Intersections) const auto r = uniform(rng, 0.0f, 10.0f); const auto h = uniform(rng, 0.0f, 10.0f); + const auto a = uniform(rng, 5_deg, 180_deg); // sensible range for a convex inf_cone const auto n1 = tg::uniform<tg::dir1>(rng); const auto n2 = tg::uniform<tg::dir2>(rng); const auto n3 = tg::uniform<tg::dir3>(rng); @@ -168,6 +169,8 @@ TG_FUZZ_TEST(TypedGeometry, Intersections) test_obj_and_boundary(ray3, tg::capsule3(axis0, r)); // cylinder test_obj_and_boundary_no_caps(ray3, tg::cylinder<3, float>(axis0, r)); + // ellipse + test_obj(ray3, tg::ellipse2in3(pos30, m23)); // halfspace test_solid_obj(ray1, tg::halfspace1(n1, h)); test_solid_obj(ray2, tg::halfspace2(n2, h)); @@ -178,8 +181,12 @@ TG_FUZZ_TEST(TypedGeometry, Intersections) test_obj_and_boundary_no_caps(ray2, tg::hemisphere2(pos20, r, n2)); test_obj_and_boundary_no_caps(ray3, tg::hemisphere3(pos30, r, n3)); // test_obj_and_boundary_no_caps(ray4, tg::hemisphere4(pos40, r, n4)); + // inf_cone + test_obj_and_boundary(ray2, tg::inf_cone2(pos20, n2, a)); + test_obj_and_boundary(ray3, tg::inf_cone3(pos30, n3, a)); // inf_cylinder - test_obj_and_boundary(ray2, tg::inf_cylinder<2, float>(tg::line2(pos20, n2), r)); + test_obj_and_boundary(ray2, tg::inf_cylinder2(tg::line2(pos20, n2), r)); + test_obj_and_boundary(ray3, tg::inf_cylinder3(tg::line3(pos30, n3), r)); // line test_obj(ray2, tg::line2(pos20, n2)); // plane diff --git a/tests/feature/objects/any_point.cc b/tests/feature/objects/any_point.cc index f1e26aa4f1eae4089511eb6fd6500a8c1ea88ee2..b616a1e393b4e3ecd031e9b7cd1bbff3b3bd20bb 100644 --- a/tests/feature/objects/any_point.cc +++ b/tests/feature/objects/any_point.cc @@ -103,8 +103,10 @@ TG_FUZZ_TEST(TypedGeometry, AnyPoint) test_obj_and_boundary_no_caps(tg::hemisphere3(pos30, r, n3)); // test_obj_and_boundary_no_caps(tg::hemisphere4(pos40, r, n4)); // inf_cone + test_obj_and_boundary(tg::inf_cone2(pos20, n2, a)); test_obj_and_boundary(tg::inf_cone3(pos30, n3, a)); // inf_cylinder + test_obj_and_boundary(tg::inf_cylinder2(tg::line2(pos20, n2), r)); test_obj_and_boundary(tg::inf_cylinder3(tg::line3(pos30, n3), r)); // line test_obj(tg::line1(pos10, n1));