Commit 42f32c84 authored by Julian Schakib's avatar Julian Schakib
Browse files

plane-inf_cone intersections

parent a445fa61
Pipeline #13650 failed with stage
in 6 minutes and 26 seconds
typed-geometry @ e1b6ba80
Subproject commit 1772a71b6a4df2a65b7eb9f68a7bb14e941518cd
Subproject commit e1b6ba80c076f446f7943b83ae3992ce7751fb24
......@@ -141,21 +141,22 @@ TG_FUZZ_TEST(Plane, Intersect)
}
}
// plane3 - inf_cone3_boundary
// plane3 - inf_cone3
{
auto const box = tg::aabb3(tg::pos3(-10.0f), tg::pos3(10.0f));
auto const center = uniform(rng, box);
auto const d = tg::uniform<tg::dir3>(rng);
auto p = tg::plane3(d, center + d);
auto const c = tg::inf_cone<3, tg::f32>(center, d, tg::degree(30.0f));
auto const c = tg::inf_cone<3, tg::f32>(center, d, tg::degree(uniform(rng, 1.0f, 80.0f)));
auto p = tg::plane3(d, center + d);
CHECK(intersects(c, p));
p = tg::plane3(d, center - d * 100);
p = tg::plane3(d, center - d);
CHECK(!intersects(c, p));
p.normal = any_normal(d);
CHECK(intersects(c, p));
}
}
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