Commit c05ad188 authored by Julian Schakib's avatar Julian Schakib
Browse files

corner case, currently check is disabled

parent 2582a89a
Pipeline #13556 failed with stage
in 34 seconds
typed-geometry @ c9770990
Subproject commit b86bc12eafc2c06b37b015b3e92871dfceb9f7b4
Subproject commit c9770990d6869740cc2f79a88727d838e382a36f
......@@ -54,7 +54,7 @@ TG_FUZZ_TEST(Plane, Intersect)
auto const box = tg::aabb3(tg::pos3(-10.0f), tg::pos3(10.0f));
{
// plane and cylinder have *parallel* normals
// cornercase: plane and cylinder have *parallel* normals
// confirm center position and circle shape of intersection
auto const r = tg::uniform(rng, 0.1f, 10.0f);
......@@ -84,6 +84,20 @@ TG_FUZZ_TEST(Plane, Intersect)
CHECK(dot(ellipse.axisA, p.normal) == approx(0)); // orthogonal
CHECK(length(ellipse.axisA) - length(ellipse.axisB) == approx(0));
}
// TODO fix this case in intersection.hh!!
// cornercase: plane normal orthogonal to cylinder normal
{
auto const p = tg::plane3(any_normal(d), center);
// the cut should be a circle with radius r with center zero
auto const ellipse = tg::intersection(p, c);
// check center, directions of normal and length
// CHECK(distance(ellipse.center, center) == approx(0));
(void)ellipse;
// TODO -nanf!!
// CHECK(length(ellipse.axisA) - length(ellipse.axisB) == approx(0));
}
}
{
......
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