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

intersection test for cone and plane (fails)

parent 42f32c84
......@@ -157,6 +157,12 @@ TG_FUZZ_TEST(Plane, Intersect)
CHECK(!intersects(c, p));
p.normal = any_normal(d);
CHECK(intersects(c, p));
auto rotation_mat = tg::rotation_around(any_normal(d), c.opening_angle);
auto new_normal = normalize(rotation_mat * d);
p = tg::plane3(new_normal, center - new_normal * 100);
// TODO should not intersect! is moved away from center and normal is oriented so that the plane runs parallel to the cone (?)
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