Fix misc issues within intersection tests themselves

This commit is contained in:
Mael Rouxel-Labbé 2021-08-06 10:12:37 +02:00
parent 0002c4ae61
commit db4c3fbc76
5 changed files with 376 additions and 353 deletions

View File

@ -92,7 +92,7 @@ bool first_comes_first(const typename K::Point_3& ref_source,
template <class K, class SegmentContainer, class PointContainer>
typename Intersection_traits<K, typename K::Tetrahedron_3, typename K::Triangle_3>::result_type
build_intersection(const typename K::Tetrahedron_3& input_tetrahedron,
build_intersection(const typename K::Tetrahedron_3& /*input_tetrahedron*/,
const typename K::Triangle_3& input_triangle,
PointContainer& points,
SegmentContainer& segments,

View File

@ -70,392 +70,403 @@ void test(const int argc)
// INTERSECTION
// ---------------------------------------------------------------------------------------------
call_intersection_global(Cub(), Bbox_3());
call_intersection_global(Cub(), Cub());
call_intersection_global(Cub(), L());
call_intersection_global(Cub(), Pl());
call_intersection_global(Cub(), P());
call_intersection_global(Cub(), R());
call_intersection_global(Cub(), S());
call_intersection_global(Cub(), Tr());
Bbox_3 bbox { 0, 0, 0, 1, 1, 1 };
Cub cub { 0, 0, 0, 1, 1, 1 };
L l { P{0, 0, 0}, P{1, 1, 1} };
Pl pl { P{0, 0, 0}, P{1, 0, 0}, P{0, 1, 0} };
P p { 0, 0, 0 };
R r { P{0, 0, 0}, P{1, 1, 1} };
S s { P{0, 0, 0}, P{1, 1, 1} };
Sph sph { P{0, 0, 0}, 1 };
Tr tr { P{0, 0, 0}, P{1, 0, 0}, P{0, 1, 0} };
T tet { P{0, 0, 0}, P{1, 0, 0}, P{0, 1, 0}, P{0, 0, 1} };
call_intersection_global(L(), Bbox_3());
call_intersection_global(L(), Cub());
call_intersection_global(L(), L());
call_intersection_global(L(), Pl());
call_intersection_global(L(), P());
call_intersection_global(L(), R());
call_intersection_global(L(), S());
call_intersection_global(L(), T());
call_intersection_global(L(), Tr());
call_intersection_global(cub, bbox);
call_intersection_global(cub, cub);
call_intersection_global(cub, l);
call_intersection_global(cub, pl);
call_intersection_global(cub, p);
call_intersection_global(cub, r);
call_intersection_global(cub, s);
call_intersection_global(cub, tr);
call_intersection_global(Pl(), Bbox_3());
call_intersection_global(Pl(), Cub());
call_intersection_global(Pl(), L());
call_intersection_global(Pl(), Pl());
call_intersection_global(Pl(), P());
call_intersection_global(Pl(), R());
call_intersection_global(Pl(), S());
call_intersection_global(Pl(), Sph());
call_intersection_global(Pl(), Tr());
call_intersection_global(Pl(), T());
call_intersection_global(l, bbox);
call_intersection_global(l, cub);
call_intersection_global(l, l);
call_intersection_global(l, pl);
call_intersection_global(l, p);
call_intersection_global(l, r);
call_intersection_global(l, s);
call_intersection_global(l, tet);
call_intersection_global(l, tr);
auto plplpl = CGAL::intersection(Pl(), Pl(), Pl());
call_intersection_global(pl, bbox);
call_intersection_global(pl, cub);
call_intersection_global(pl, l);
call_intersection_global(pl, pl);
call_intersection_global(pl, p);
call_intersection_global(pl, r);
call_intersection_global(pl, s);
call_intersection_global(pl, sph);
call_intersection_global(pl, tr);
call_intersection_global(pl, tet);
auto plplpl = CGAL::intersection(pl, pl, pl);
CGAL_USE(plplpl);
call_intersection_global(P(), Bbox_3());
call_intersection_global(P(), Cub());
call_intersection_global(P(), L());
call_intersection_global(P(), Pl());
call_intersection_global(P(), P());
call_intersection_global(P(), R());
call_intersection_global(P(), S());
call_intersection_global(P(), Sph());
call_intersection_global(P(), Tr());
call_intersection_global(P(), T());
call_intersection_global(p, bbox);
call_intersection_global(p, cub);
call_intersection_global(p, l);
call_intersection_global(p, pl);
call_intersection_global(p, p);
call_intersection_global(p, r);
call_intersection_global(p, s);
call_intersection_global(p, sph);
call_intersection_global(p, tr);
call_intersection_global(p, tet);
call_intersection_global(R(), Bbox_3());
call_intersection_global(R(), Cub());
call_intersection_global(R(), L());
call_intersection_global(R(), Pl());
call_intersection_global(R(), P());
call_intersection_global(R(), R());
call_intersection_global(R(), S());
call_intersection_global(R(), Tr());
call_intersection_global(R(), T());
call_intersection_global(r, bbox);
call_intersection_global(r, cub);
call_intersection_global(r, l);
call_intersection_global(r, pl);
call_intersection_global(r, p);
call_intersection_global(r, r);
call_intersection_global(r, s);
call_intersection_global(r, tr);
call_intersection_global(r, tet);
call_intersection_global(S(), Bbox_3());
call_intersection_global(S(), Cub());
call_intersection_global(S(), L());
call_intersection_global(S(), Pl());
call_intersection_global(S(), P());
call_intersection_global(S(), R());
call_intersection_global(S(), S());
call_intersection_global(S(), T());
call_intersection_global(S(), Tr());
call_intersection_global(s, bbox);
call_intersection_global(s, cub);
call_intersection_global(s, l);
call_intersection_global(s, pl);
call_intersection_global(s, p);
call_intersection_global(s, r);
call_intersection_global(s, s);
call_intersection_global(s, tet);
call_intersection_global(s, tr);
call_intersection_global(Sph(), Pl());
call_intersection_global(Sph(), P());
call_intersection_global(Sph(), Sph());
call_intersection_global(sph, pl);
call_intersection_global(sph, p);
call_intersection_global(sph, sph);
call_intersection_global(Tr(), Bbox_3());
call_intersection_global(Tr(), Cub());
call_intersection_global(Tr(), L());
call_intersection_global(Tr(), Pl());
call_intersection_global(Tr(), P());
call_intersection_global(Tr(), R());
call_intersection_global(Tr(), S());
call_intersection_global(Tr(), Tr());
call_intersection_global(Tr(), T());
call_intersection_global(tr, bbox);
call_intersection_global(tr, cub);
call_intersection_global(tr, l);
call_intersection_global(tr, pl);
call_intersection_global(tr, p);
call_intersection_global(tr, r);
call_intersection_global(tr, s);
call_intersection_global(tr, tr);
call_intersection_global(tr, tet);
call_intersection_global(T(), L());
call_intersection_global(T(), Pl());
call_intersection_global(T(), P());
call_intersection_global(T(), R());
call_intersection_global(T(), S());
call_intersection_global(T(), Tr());
call_intersection_global(tet, l);
call_intersection_global(tet, pl);
call_intersection_global(tet, p);
call_intersection_global(tet, r);
call_intersection_global(tet, s);
call_intersection_global(tet, tr);
const auto bbbb = CGAL::intersection(Bbox_3(), Bbox_3());
const auto bbbb = CGAL::intersection(bbox, bbox);
CGAL_USE(bbbb);
call_intersection_global(Bbox_3(), Cub());
call_intersection_global(Bbox_3(), L());
call_intersection_global(Bbox_3(), Pl());
call_intersection_global(Bbox_3(), P());
call_intersection_global(Bbox_3(), R());
call_intersection_global(Bbox_3(), S());
call_intersection_global(Bbox_3(), Tr());
call_intersection_global(bbox, cub);
call_intersection_global(bbox, l);
call_intersection_global(bbox, pl);
call_intersection_global(bbox, p);
call_intersection_global(bbox, r);
call_intersection_global(bbox, s);
call_intersection_global(bbox, tr);
call_intersection_global(T(), L());
call_intersection_global(tet, l);
// with kernel
call_intersection_with_kernel(Cub(), Bbox_3(), K());
call_intersection_with_kernel(Cub(), Cub(), K());
call_intersection_with_kernel(Cub(), L(), K());
call_intersection_with_kernel(Cub(), Pl(), K());
call_intersection_with_kernel(Cub(), P(), K());
call_intersection_with_kernel(Cub(), R(), K());
call_intersection_with_kernel(Cub(), S(), K());
call_intersection_with_kernel(Cub(), Tr(), K());
call_intersection_with_kernel(cub, bbox, K());
call_intersection_with_kernel(cub, cub, K());
call_intersection_with_kernel(cub, l, K());
call_intersection_with_kernel(cub, pl, K());
call_intersection_with_kernel(cub, p, K());
call_intersection_with_kernel(cub, r, K());
call_intersection_with_kernel(cub, s, K());
call_intersection_with_kernel(cub, tr, K());
call_intersection_with_kernel(L(), Bbox_3(), K());
call_intersection_with_kernel(L(), Cub(), K());
call_intersection_with_kernel(L(), L(), K());
call_intersection_with_kernel(L(), Pl(), K());
call_intersection_with_kernel(L(), P(), K());
call_intersection_with_kernel(L(), R(), K());
call_intersection_with_kernel(L(), S(), K());
call_intersection_with_kernel(L(), Tr(), K());
call_intersection_with_kernel(L(), T(), K());
call_intersection_with_kernel(l, bbox, K());
call_intersection_with_kernel(l, cub, K());
call_intersection_with_kernel(l, l, K());
call_intersection_with_kernel(l, pl, K());
call_intersection_with_kernel(l, p, K());
call_intersection_with_kernel(l, r, K());
call_intersection_with_kernel(l, s, K());
call_intersection_with_kernel(l, tr, K());
call_intersection_with_kernel(l, tet, K());
call_intersection_with_kernel(Pl(), Bbox_3(), K());
call_intersection_with_kernel(Pl(), Cub(), K());
call_intersection_with_kernel(Pl(), L(), K());
call_intersection_with_kernel(Pl(), Pl(), K());
call_intersection_with_kernel(Pl(), P(), K());
call_intersection_with_kernel(Pl(), R(), K());
call_intersection_with_kernel(Pl(), S(), K());
call_intersection_with_kernel(Pl(), Tr(), K());
call_intersection_with_kernel(Pl(), T(), K());
call_intersection_with_kernel(pl, bbox, K());
call_intersection_with_kernel(pl, cub, K());
call_intersection_with_kernel(pl, l, K());
call_intersection_with_kernel(pl, pl, K());
call_intersection_with_kernel(pl, p, K());
call_intersection_with_kernel(pl, r, K());
call_intersection_with_kernel(pl, s, K());
call_intersection_with_kernel(pl, tr, K());
call_intersection_with_kernel(pl, tet, K());
//special
plplpl = K().intersect_3_object()(Pl(), Pl(), Pl());
plplpl = K().intersect_3_object()(pl, pl, pl);
CGAL_USE(plplpl);
call_intersection_with_kernel(P(), Bbox_3(), K());
call_intersection_with_kernel(P(), Cub(), K());
call_intersection_with_kernel(P(), L(), K());
call_intersection_with_kernel(P(), Pl(), K());
call_intersection_with_kernel(P(), P(), K());
call_intersection_with_kernel(P(), R(), K());
call_intersection_with_kernel(P(), S(), K());
call_intersection_with_kernel(P(), Sph(), K());
call_intersection_with_kernel(P(), Tr(), K());
call_intersection_with_kernel(P(), T(), K());
call_intersection_with_kernel(p, bbox, K());
call_intersection_with_kernel(p, cub, K());
call_intersection_with_kernel(p, l, K());
call_intersection_with_kernel(p, pl, K());
call_intersection_with_kernel(p, p, K());
call_intersection_with_kernel(p, r, K());
call_intersection_with_kernel(p, s, K());
call_intersection_with_kernel(p, sph, K());
call_intersection_with_kernel(p, tr, K());
call_intersection_with_kernel(p, tet, K());
call_intersection_with_kernel(R(), Bbox_3(), K());
call_intersection_with_kernel(R(), Cub(), K());
call_intersection_with_kernel(R(), L(), K());
call_intersection_with_kernel(R(), Pl(), K());
call_intersection_with_kernel(R(), P(), K());
call_intersection_with_kernel(R(), R(), K());
call_intersection_with_kernel(R(), S(), K());
call_intersection_with_kernel(R(), Tr(), K());
call_intersection_with_kernel(R(), T(), K());
call_intersection_with_kernel(r, bbox, K());
call_intersection_with_kernel(r, cub, K());
call_intersection_with_kernel(r, l, K());
call_intersection_with_kernel(r, pl, K());
call_intersection_with_kernel(r, p, K());
call_intersection_with_kernel(r, r, K());
call_intersection_with_kernel(r, s, K());
call_intersection_with_kernel(r, tr, K());
call_intersection_with_kernel(r, tet, K());
call_intersection_with_kernel(S(), Bbox_3(), K());
call_intersection_with_kernel(S(), Cub(), K());
call_intersection_with_kernel(S(), L(), K());
call_intersection_with_kernel(S(), Pl(), K());
call_intersection_with_kernel(S(), P(), K());
call_intersection_with_kernel(S(), R(), K());
call_intersection_with_kernel(S(), S(), K());
call_intersection_with_kernel(S(), Tr(), K());
call_intersection_with_kernel(S(), T(), K());
call_intersection_with_kernel(s, bbox, K());
call_intersection_with_kernel(s, cub, K());
call_intersection_with_kernel(s, l, K());
call_intersection_with_kernel(s, pl, K());
call_intersection_with_kernel(s, p, K());
call_intersection_with_kernel(s, r, K());
call_intersection_with_kernel(s, s, K());
call_intersection_with_kernel(s, tr, K());
call_intersection_with_kernel(s, tet, K());
call_intersection_with_kernel(Sph(), Pl(), K());
call_intersection_with_kernel(Sph(), P(), K());
call_intersection_with_kernel(Sph(), Sph(), K());
call_intersection_with_kernel(sph, pl, K());
call_intersection_with_kernel(sph, p, K());
call_intersection_with_kernel(sph, sph, K());
call_intersection_with_kernel(Tr(), Bbox_3(), K());
call_intersection_with_kernel(Tr(), Cub(), K());
call_intersection_with_kernel(Tr(), L(), K());
call_intersection_with_kernel(Tr(), Pl(), K());
call_intersection_with_kernel(Tr(), P(), K());
call_intersection_with_kernel(Tr(), R(), K());
call_intersection_with_kernel(Tr(), S(), K());
call_intersection_with_kernel(Tr(), Tr(), K());
call_intersection_with_kernel(Tr(), T(), K());
call_intersection_with_kernel(tr, bbox, K());
call_intersection_with_kernel(tr, cub, K());
call_intersection_with_kernel(tr, l, K());
call_intersection_with_kernel(tr, pl, K());
call_intersection_with_kernel(tr, p, K());
call_intersection_with_kernel(tr, r, K());
call_intersection_with_kernel(tr, s, K());
call_intersection_with_kernel(tr, tr, K());
call_intersection_with_kernel(tr, tet, K());
call_intersection_with_kernel(T(), L(), K());
call_intersection_with_kernel(T(), Pl(), K());
call_intersection_with_kernel(T(), P(), K());
call_intersection_with_kernel(T(), R(), K());
call_intersection_with_kernel(T(), S(), K());
call_intersection_with_kernel(T(), Tr(), K());
call_intersection_with_kernel(tet, l, K());
call_intersection_with_kernel(tet, pl, K());
call_intersection_with_kernel(tet, p, K());
call_intersection_with_kernel(tet, r, K());
call_intersection_with_kernel(tet, s, K());
call_intersection_with_kernel(tet, tr, K());
call_intersection_with_kernel(Bbox_3(), Cub(), K());
call_intersection_with_kernel(Bbox_3(), L(), K());
call_intersection_with_kernel(Bbox_3(), Pl(), K());
call_intersection_with_kernel(Bbox_3(), P(), K());
call_intersection_with_kernel(Bbox_3(), R(), K());
call_intersection_with_kernel(Bbox_3(), S(), K());
call_intersection_with_kernel(Bbox_3(), Tr(), K());
call_intersection_with_kernel(bbox, cub, K());
call_intersection_with_kernel(bbox, l, K());
call_intersection_with_kernel(bbox, pl, K());
call_intersection_with_kernel(bbox, p, K());
call_intersection_with_kernel(bbox, r, K());
call_intersection_with_kernel(bbox, s, K());
call_intersection_with_kernel(bbox, tr, K());
// ---------------------------------------------------------------------------------------------
// DO INTERSECT
// ---------------------------------------------------------------------------------------------
call_do_intersect_global(L(), Cub());
call_do_intersect_global(L(), Bbox_3());
call_do_intersect_global(L(), L());
call_do_intersect_global(L(), Pl());
call_do_intersect_global(L(), P());
call_do_intersect_global(L(), R());
call_do_intersect_global(L(), S());
call_do_intersect_global(L(), Sph());
call_do_intersect_global(L(), Tr());
call_do_intersect_global(L(), T());
call_do_intersect_global(l, cub);
call_do_intersect_global(l, bbox);
call_do_intersect_global(l, l);
call_do_intersect_global(l, pl);
call_do_intersect_global(l, p);
call_do_intersect_global(l, r);
call_do_intersect_global(l, s);
call_do_intersect_global(l, sph);
call_do_intersect_global(l, tr);
call_do_intersect_global(l, tet);
call_do_intersect_global(Pl(), Bbox_3());
call_do_intersect_global(Pl(), Cub());
call_do_intersect_global(Pl(), L());
call_do_intersect_global(Pl(), Pl());
call_do_intersect_global(Pl(), P());
call_do_intersect_global(Pl(), R());
call_do_intersect_global(Pl(), S());
call_do_intersect_global(Pl(), Sph());
call_do_intersect_global(Pl(), Tr());
call_do_intersect_global(Pl(), T());
call_do_intersect_global(pl, bbox);
call_do_intersect_global(pl, cub);
call_do_intersect_global(pl, l);
call_do_intersect_global(pl, pl);
call_do_intersect_global(pl, p);
call_do_intersect_global(pl, r);
call_do_intersect_global(pl, s);
call_do_intersect_global(pl, sph);
call_do_intersect_global(pl, tr);
call_do_intersect_global(pl, tet);
call_do_intersect_global(P(), Bbox_3());
call_do_intersect_global(P(), Cub());
call_do_intersect_global(P(), L());
call_do_intersect_global(P(), Pl());
call_do_intersect_global(P(), P());
call_do_intersect_global(P(), R());
call_do_intersect_global(P(), S());
call_do_intersect_global(P(), Sph());
call_do_intersect_global(P(), Tr());
call_do_intersect_global(P(), T());
call_do_intersect_global(p, bbox);
call_do_intersect_global(p, cub);
call_do_intersect_global(p, l);
call_do_intersect_global(p, pl);
call_do_intersect_global(p, p);
call_do_intersect_global(p, r);
call_do_intersect_global(p, s);
call_do_intersect_global(p, sph);
call_do_intersect_global(p, tr);
call_do_intersect_global(p, tet);
call_do_intersect_global(R(), Bbox_3());
call_do_intersect_global(R(), Cub());
call_do_intersect_global(R(), L());
call_do_intersect_global(R(), Pl());
call_do_intersect_global(R(), P());
call_do_intersect_global(R(), R());
call_do_intersect_global(R(), S());
call_do_intersect_global(R(), Tr());
call_do_intersect_global(R(), T());
call_do_intersect_global(r, bbox);
call_do_intersect_global(r, cub);
call_do_intersect_global(r, l);
call_do_intersect_global(r, pl);
call_do_intersect_global(r, p);
call_do_intersect_global(r, r);
call_do_intersect_global(r, s);
call_do_intersect_global(r, tr);
call_do_intersect_global(r, tet);
call_do_intersect_global(S(), Bbox_3());
call_do_intersect_global(S(), Cub());
call_do_intersect_global(S(), Pl());
call_do_intersect_global(S(), P());
call_do_intersect_global(S(), L());
call_do_intersect_global(S(), R());
call_do_intersect_global(S(), S());
call_do_intersect_global(S(), Sph());
call_do_intersect_global(S(), Tr());
call_do_intersect_global(S(), T());
call_do_intersect_global(s, bbox);
call_do_intersect_global(s, cub);
call_do_intersect_global(s, pl);
call_do_intersect_global(s, p);
call_do_intersect_global(s, l);
call_do_intersect_global(s, r);
call_do_intersect_global(s, s);
call_do_intersect_global(s, sph);
call_do_intersect_global(s, tr);
call_do_intersect_global(s, tet);
call_do_intersect_global(Sph(), Bbox_3());
call_do_intersect_global(Sph(), Cub());
call_do_intersect_global(Sph(), Pl());
call_do_intersect_global(Sph(), P());
call_do_intersect_global(Sph(), L());
call_do_intersect_global(Sph(), R());
call_do_intersect_global(Sph(), S());
call_do_intersect_global(Sph(), Sph());
call_do_intersect_global(Sph(), Tr());
call_do_intersect_global(Sph(), T());
call_do_intersect_global(sph, bbox);
call_do_intersect_global(sph, cub);
call_do_intersect_global(sph, pl);
call_do_intersect_global(sph, p);
call_do_intersect_global(sph, l);
call_do_intersect_global(sph, r);
call_do_intersect_global(sph, s);
call_do_intersect_global(sph, sph);
call_do_intersect_global(sph, tr);
call_do_intersect_global(sph, tet);
call_do_intersect_global(Tr(), Bbox_3());
call_do_intersect_global(Tr(), Cub());
call_do_intersect_global(Tr(), L());
call_do_intersect_global(Tr(), Pl());
call_do_intersect_global(Tr(), P());
call_do_intersect_global(Tr(), R());
call_do_intersect_global(Tr(), S());
call_do_intersect_global(Tr(), Sph());
call_do_intersect_global(Tr(), Tr());
call_do_intersect_global(Tr(), T());
call_do_intersect_global(tr, bbox);
call_do_intersect_global(tr, cub);
call_do_intersect_global(tr, l);
call_do_intersect_global(tr, pl);
call_do_intersect_global(tr, p);
call_do_intersect_global(tr, r);
call_do_intersect_global(tr, s);
call_do_intersect_global(tr, sph);
call_do_intersect_global(tr, tr);
call_do_intersect_global(tr, tet);
call_do_intersect_global(Tr(), Bbox_3());
call_do_intersect_global(Tr(), Cub());
call_do_intersect_global(Tr(), L());
call_do_intersect_global(Tr(), Pl());
call_do_intersect_global(Tr(), P());
call_do_intersect_global(Tr(), R());
call_do_intersect_global(Tr(), S());
call_do_intersect_global(Tr(), Sph());
call_do_intersect_global(Tr(), Tr());
call_do_intersect_global(Tr(), T());
call_do_intersect_global(tr, bbox);
call_do_intersect_global(tr, cub);
call_do_intersect_global(tr, l);
call_do_intersect_global(tr, pl);
call_do_intersect_global(tr, p);
call_do_intersect_global(tr, r);
call_do_intersect_global(tr, s);
call_do_intersect_global(tr, sph);
call_do_intersect_global(tr, tr);
call_do_intersect_global(tr, tet);
call_do_intersect_global(T(), Bbox_3());
call_do_intersect_global(T(), Cub());
call_do_intersect_global(T(), L());
call_do_intersect_global(T(), Pl());
call_do_intersect_global(T(), P());
call_do_intersect_global(T(), R());
call_do_intersect_global(T(), S());
call_do_intersect_global(T(), Sph());
call_do_intersect_global(T(), Tr());
call_do_intersect_global(T(), T());
call_do_intersect_global(tet, bbox);
call_do_intersect_global(tet, cub);
call_do_intersect_global(tet, l);
call_do_intersect_global(tet, pl);
call_do_intersect_global(tet, p);
call_do_intersect_global(tet, r);
call_do_intersect_global(tet, s);
call_do_intersect_global(tet, sph);
call_do_intersect_global(tet, tr);
call_do_intersect_global(tet, tet);
call_do_intersect_global(Bbox_3(), Pl());
call_do_intersect_global(Bbox_3(), L());
call_do_intersect_global(Bbox_3(), R());
call_do_intersect_global(Bbox_3(), S());
call_do_intersect_global(Bbox_3(), Tr());
call_do_intersect_global(Bbox_3(), Sph());
call_do_intersect_global(Bbox_3(), Bbox_3());
call_do_intersect_global(bbox, pl);
call_do_intersect_global(bbox, l);
call_do_intersect_global(bbox, r);
call_do_intersect_global(bbox, s);
call_do_intersect_global(bbox, tr);
call_do_intersect_global(bbox, sph);
call_do_intersect_global(bbox, bbox);
// with_kernel
call_do_intersect_with_kernel(L(), Bbox_3(), K());
call_do_intersect_with_kernel(L(), Cub(), K());
call_do_intersect_with_kernel(L(), L(), K());
call_do_intersect_with_kernel(L(), Pl(), K());
call_do_intersect_with_kernel(L(), P(), K());
call_do_intersect_with_kernel(L(), R(), K());
call_do_intersect_with_kernel(L(), S(), K());
call_do_intersect_with_kernel(L(), Sph(), K());
call_do_intersect_with_kernel(L(), Tr(), K());
call_do_intersect_with_kernel(L(), T(), K());
call_do_intersect_with_kernel(l, bbox, K());
call_do_intersect_with_kernel(l, cub, K());
call_do_intersect_with_kernel(l, l, K());
call_do_intersect_with_kernel(l, pl, K());
call_do_intersect_with_kernel(l, p, K());
call_do_intersect_with_kernel(l, r, K());
call_do_intersect_with_kernel(l, s, K());
call_do_intersect_with_kernel(l, sph, K());
call_do_intersect_with_kernel(l, tr, K());
call_do_intersect_with_kernel(l, tet, K());
call_do_intersect_with_kernel(Pl(), Bbox_3(), K());
call_do_intersect_with_kernel(Pl(), Cub(), K());
call_do_intersect_with_kernel(Pl(), L(), K());
call_do_intersect_with_kernel(Pl(), Pl(), K());
call_do_intersect_with_kernel(Pl(), P(), K());
call_do_intersect_with_kernel(Pl(), R(), K());
call_do_intersect_with_kernel(Pl(), S(), K());
call_do_intersect_with_kernel(Pl(), Sph(), K());
call_do_intersect_with_kernel(Pl(), Tr(), K());
call_do_intersect_with_kernel(Pl(), T(), K());
call_do_intersect_with_kernel(pl, bbox, K());
call_do_intersect_with_kernel(pl, cub, K());
call_do_intersect_with_kernel(pl, l, K());
call_do_intersect_with_kernel(pl, pl, K());
call_do_intersect_with_kernel(pl, p, K());
call_do_intersect_with_kernel(pl, r, K());
call_do_intersect_with_kernel(pl, s, K());
call_do_intersect_with_kernel(pl, sph, K());
call_do_intersect_with_kernel(pl, tr, K());
call_do_intersect_with_kernel(pl, tet, K());
call_do_intersect_with_kernel(P(), Bbox_3(), K());
call_do_intersect_with_kernel(P(), Cub(), K());
call_do_intersect_with_kernel(P(), L(), K());
call_do_intersect_with_kernel(P(), Pl(), K());
call_do_intersect_with_kernel(P(), P(), K());
call_do_intersect_with_kernel(P(), R(), K());
call_do_intersect_with_kernel(P(), S(), K());
call_do_intersect_with_kernel(P(), Sph(), K());
call_do_intersect_with_kernel(P(), Tr(), K());
call_do_intersect_with_kernel(P(), T(), K());
call_do_intersect_with_kernel(p, bbox, K());
call_do_intersect_with_kernel(p, cub, K());
call_do_intersect_with_kernel(p, l, K());
call_do_intersect_with_kernel(p, pl, K());
call_do_intersect_with_kernel(p, p, K());
call_do_intersect_with_kernel(p, r, K());
call_do_intersect_with_kernel(p, s, K());
call_do_intersect_with_kernel(p, sph, K());
call_do_intersect_with_kernel(p, tr, K());
call_do_intersect_with_kernel(p, tet, K());
call_do_intersect_with_kernel(R(), Bbox_3(), K());
call_do_intersect_with_kernel(R(), Cub(), K());
call_do_intersect_with_kernel(R(), L(), K());
call_do_intersect_with_kernel(R(), Pl(), K());
call_do_intersect_with_kernel(R(), P(), K());
call_do_intersect_with_kernel(R(), R(), K());
call_do_intersect_with_kernel(R(), S(), K());
call_do_intersect_with_kernel(R(), Sph(), K());
call_do_intersect_with_kernel(R(), Tr(), K());
call_do_intersect_with_kernel(R(), T(), K());
call_do_intersect_with_kernel(r, bbox, K());
call_do_intersect_with_kernel(r, cub, K());
call_do_intersect_with_kernel(r, l, K());
call_do_intersect_with_kernel(r, pl, K());
call_do_intersect_with_kernel(r, p, K());
call_do_intersect_with_kernel(r, r, K());
call_do_intersect_with_kernel(r, s, K());
call_do_intersect_with_kernel(r, sph, K());
call_do_intersect_with_kernel(r, tr, K());
call_do_intersect_with_kernel(r, tet, K());
call_do_intersect_with_kernel(S(), Bbox_3(), K());
call_do_intersect_with_kernel(S(), Cub(), K());
call_do_intersect_with_kernel(S(), R(), K());
call_do_intersect_with_kernel(S(), L(), K());
call_do_intersect_with_kernel(S(), P(), K());
call_do_intersect_with_kernel(S(), R(), K());
call_do_intersect_with_kernel(S(), S(), K());
call_do_intersect_with_kernel(S(), Sph(), K());
call_do_intersect_with_kernel(S(), Tr(), K());
call_do_intersect_with_kernel(S(), T(), K());
call_do_intersect_with_kernel(s, bbox, K());
call_do_intersect_with_kernel(s, cub, K());
call_do_intersect_with_kernel(s, r, K());
call_do_intersect_with_kernel(s, l, K());
call_do_intersect_with_kernel(s, p, K());
call_do_intersect_with_kernel(s, r, K());
call_do_intersect_with_kernel(s, s, K());
call_do_intersect_with_kernel(s, sph, K());
call_do_intersect_with_kernel(s, tr, K());
call_do_intersect_with_kernel(s, tet, K());
call_do_intersect_with_kernel(Tr(), Bbox_3(), K());
call_do_intersect_with_kernel(Tr(), Cub(), K());
call_do_intersect_with_kernel(Tr(), R(), K());
call_do_intersect_with_kernel(Tr(), L(), K());
call_do_intersect_with_kernel(Tr(), P(), K());
call_do_intersect_with_kernel(Tr(), R(), K());
call_do_intersect_with_kernel(Tr(), S(), K());
call_do_intersect_with_kernel(Tr(), Tr(), K());
call_do_intersect_with_kernel(Tr(), T(), K());
call_do_intersect_with_kernel(tr, bbox, K());
call_do_intersect_with_kernel(tr, cub, K());
call_do_intersect_with_kernel(tr, r, K());
call_do_intersect_with_kernel(tr, l, K());
call_do_intersect_with_kernel(tr, p, K());
call_do_intersect_with_kernel(tr, r, K());
call_do_intersect_with_kernel(tr, s, K());
call_do_intersect_with_kernel(tr, tr, K());
call_do_intersect_with_kernel(tr, tet, K());
call_do_intersect_with_kernel(T(), Bbox_3(), K());
call_do_intersect_with_kernel(T(), Cub(), K());
call_do_intersect_with_kernel(T(), R(), K());
call_do_intersect_with_kernel(T(), L(), K());
call_do_intersect_with_kernel(T(), P(), K());
call_do_intersect_with_kernel(T(), R(), K());
call_do_intersect_with_kernel(T(), S(), K());
call_do_intersect_with_kernel(T(), Tr(), K());
call_do_intersect_with_kernel(T(), T(), K());
call_do_intersect_with_kernel(tet, bbox, K());
call_do_intersect_with_kernel(tet, cub, K());
call_do_intersect_with_kernel(tet, r, K());
call_do_intersect_with_kernel(tet, l, K());
call_do_intersect_with_kernel(tet, p, K());
call_do_intersect_with_kernel(tet, r, K());
call_do_intersect_with_kernel(tet, s, K());
call_do_intersect_with_kernel(tet, tr, K());
call_do_intersect_with_kernel(tet, tet, K());
call_do_intersect_with_kernel(Bbox_3(), Cub(), K());
call_do_intersect_with_kernel(Bbox_3(), L(), K());
call_do_intersect_with_kernel(Bbox_3(), Pl(), K());
call_do_intersect_with_kernel(Bbox_3(), P(), K());
call_do_intersect_with_kernel(Bbox_3(), R(), K());
call_do_intersect_with_kernel(Bbox_3(), S(), K());
call_do_intersect_with_kernel(Bbox_3(), Sph(), K());
call_do_intersect_with_kernel(Bbox_3(), Tr(), K());
call_do_intersect_with_kernel(bbox, cub, K());
call_do_intersect_with_kernel(bbox, l, K());
call_do_intersect_with_kernel(bbox, pl, K());
call_do_intersect_with_kernel(bbox, p, K());
call_do_intersect_with_kernel(bbox, r, K());
call_do_intersect_with_kernel(bbox, s, K());
call_do_intersect_with_kernel(bbox, sph, K());
call_do_intersect_with_kernel(bbox, tr, K());
}
}

View File

@ -339,17 +339,21 @@ public:
{
P tet0 = random_point(), tet1 = random_point(), tet2 = random_point(), tet3 = random_point();
if(std::set<P>({{tet0, tet1, tet2, tet3}}).size() != 4)
const Tet tet(tet0, tet1, tet2, tet3);
if(tet.is_degenerate())
continue;
P l0 = tet0 + CGAL::cross_product(V(tet0, tet1), V(tet0, tet2));
P l1 = tet2 + CGAL::cross_product(V(tet2, tet1), V(tet2, tet0));
Tet tet(tet0, tet1, tet2, tet3);
assert(tet.has_on_unbounded_side(l0) && tet.has_on_unbounded_side(l1));
if(CGAL::do_intersect(S(l0, l1), tet))
check_intersection(L(l0, l1), tet, tet, S(l0, l1));
const S s {l0, l1};
if(s.is_degenerate())
continue;
if(CGAL::do_intersect(s, tet))
check_intersection(L(l0, l1), tet, tet, s);
}
}
@ -382,14 +386,17 @@ public:
{
P tr0 = random_point(), tr1 = random_point(), tr2 = random_point();
if(tr0 == tr1 || tr1 == tr2 || tr0 == tr2)
continue;
P l0 = tr0 + CGAL::cross_product(V(tr0, tr1), V(tr0, tr2));
P l1 = tr2 + CGAL::cross_product(V(tr2, tr1), V(tr2, tr0));
if(CGAL::do_intersect(S(l0, l1), Tr(tr0, tr1, tr2)))
check_intersection(L(l0, l1), Tr(tr0, tr1, tr2), Tr(tr0, tr1, tr2), S(l0, l1));
S s{l0, l1};
Tr tr{tr0, tr1, tr2};
if(s.is_degenerate() || tr.is_degenerate())
continue;
if(CGAL::do_intersect(s, tr))
check_intersection(L(l0, l1), tr, tr, s);
}
}

View File

@ -128,7 +128,8 @@ public:
check_intersection(Pl(p(5,3,2), p(1,1,1), p(0,0,0)), P(99,99,99),
P(99,99,99));
if(this->has_exact_c)
// Homogeneous projections are broken
if(this->has_exact_c && std::is_same<typename K::Kernel_tag, CGAL::Cartesian_tag>::value)
{
for(int i=0; i<N; ++i)
{

View File

@ -21,10 +21,11 @@
#include <CGAL/Homogeneous.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/representation_tags.h>
#include <iostream>
#include <cassert>
#include <type_traits>
template <typename K>
struct Point_3_intersection_tester
@ -85,7 +86,7 @@ public:
R ray(p(-1,-1,-1), p(3,3,3));
check_intersection(ray, pt, pt);
if(this->has_exact_c)
if(this->has_exact_c && std::is_same<typename K::Kernel_tag, CGAL::Cartesian_tag>::value)
{
for(int i=0; i<N; ++i)
{
@ -94,9 +95,11 @@ public:
{
R r(rp0, rp1);
L l(rp0, rp1);
P q = random_point(), pq = l.projection(q);
P q = random_point();
P pq = l.projection(q);
assert(CGAL::collinear(rp0, rp1, pq));
if(!CGAL::collinear_are_ordered_along_line(pq, rp0, rp1))
if(pq == rp0 || !CGAL::collinear_are_ordered_along_line(pq, rp0, rp1))
check_intersection(r, pq, pq);
else
check_no_intersection(r, pq);
@ -113,7 +116,8 @@ public:
S s(p(-1,-1,-1), p(3,3,3));
check_intersection(s, pt, pt);
if(this->has_exact_c)
// @fixme Homogeneous' projection is broken
if(this->has_exact_c && std::is_same<typename K::Kernel_tag, CGAL::Cartesian_tag>::value)
{
for(int i=0; i<N; ++i)
{
@ -124,7 +128,7 @@ public:
L l(rp0, rp1);
P q = random_point(), pq = l.projection(q);
assert(CGAL::collinear(rp0, rp1, pq));
if(CGAL::collinear_are_ordered_along_line(rp0, pq, rp1))
if(pq == rp0 || pq == rp1 || CGAL::collinear_are_strictly_ordered_along_line(rp0, pq, rp1))
check_intersection(s, pq, pq);
else
check_no_intersection(s, pq);
@ -202,7 +206,7 @@ public:
check_intersection(Tr(p(0,0,0), p(2,0,0), p(0,2,0)), p(1,1,0), p(1,1,0));
check_intersection(Tr(p(0,0,0), p(4,0,0), p(0,4,0)), p(1,1,0), p(1,1,0));
if(this->has_exact_c)
if(this->has_exact_c && std::is_same<typename K::Kernel_tag, CGAL::Cartesian_tag>::value)
{
for(int i=0; i<N; ++i)
{