Re-enable tests + enhancements

This commit is contained in:
Mael Rouxel-Labbé 2021-06-29 09:25:40 +02:00
parent 03ab79899b
commit 3afa3b546b
3 changed files with 12 additions and 13 deletions

View File

@ -36,8 +36,8 @@ do_intersect(const typename K::Ray_3& r1,
typename K::Coplanar_orientation_3 pred = k.coplanar_orientation_3_object(); typename K::Coplanar_orientation_3 pred = k.coplanar_orientation_3_object();
CGAL::Orientation p0p1s = pred(r1.point(0), r1.point(1), r2.source()); CGAL::Orientation p0p1s = pred(r1.source(), r1.second_point(), r2.source());
CGAL::Orientation stp0 = pred(r2.source(), r2.second_point(), r1.point(0)); CGAL::Orientation stp0 = pred(r2.source(), r2.second_point(), r1.source());
if(p0p1s == COLLINEAR) if(p0p1s == COLLINEAR)
{ {
@ -49,7 +49,7 @@ do_intersect(const typename K::Ray_3& r1,
} }
if(stp0 == COLLINEAR) if(stp0 == COLLINEAR)
return Ray_3_has_on_collinear_Point_3(r2, r1.point(0), k); return Ray_3_has_on_collinear_Point_3(r2, r1.source(), k);
return (p0p1s != stp0); return (p0p1s != stp0);
} }

View File

@ -72,6 +72,7 @@ public:
check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-1,0), p(1,-2,0))); check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-1,0), p(1,-2,0)));
check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,-1,0), p(0,-2,0))); check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,-1,0), p(0,-2,0)));
check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,1,0), p(0,2,0))); check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,1,0), p(0,2,0)));
check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(-1,-1,0)));
// Point // Point
check_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,0,0), p(-1,0,0)), check_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,0,0), p(-1,0,0)),
@ -88,11 +89,10 @@ public:
p(1,0,0)); p(1,0,0));
// Segment // Segment
// @fixme check_intersection (R(p(0,0,0), p(1,0,0)), R(p(2,0,0), p(-3,0,0)),
// check_intersection (R(p(0,0,0), p(1,0,0)), R(p(2,0,0), p(-3,0,0)), S(p(0,0,0), p(2,0,0)), false);
// S(p(0,0,0), p(2,0,0))); check_intersection (R(p(2,0,0), p(-3,0,0)), R(p(0,0,0), p(1,0,0)),
// check_intersection (R(p(2,0,0), p(-3,0,0)), R(p(0,0,0), p(1,0,0)), S(p(2,0,0), p(0,0,0)), false);
// S(p(2,0,0), p(0,0,0)));
// Ray // Ray
check_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(3,0,0)), check_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(3,0,0)),

View File

@ -171,9 +171,8 @@ int main(int, char**)
std::cout << " |||||||| Test Simple_cartesian<double> ||||||||" << std::endl; std::cout << " |||||||| Test Simple_cartesian<double> ||||||||" << std::endl;
Sphere_3_intersection_tester< CGAL::Simple_cartesian<double> >(r).run(); Sphere_3_intersection_tester< CGAL::Simple_cartesian<double> >(r).run();
// @fixme illegal Plane_3 constructor in Cartesian_kernel::Construct_radical_plane_3 std::cout << " |||||||| Test CGAL::Homogeneous<CGAL::MP_Float> ||||||||" << std::endl;
// std::cout << " |||||||| Test CGAL::Homogeneous<CGAL::MP_Float> ||||||||" << std::endl; Sphere_3_intersection_tester< CGAL::Homogeneous<CGAL::MP_Float> >(r).run();
// Sphere_3_intersection_tester< CGAL::Homogeneous<CGAL::MP_Float> >(r).run();
std::cout << " |||||||| Test EPICK ||||||||" << std::endl; std::cout << " |||||||| Test EPICK ||||||||" << std::endl;
Sphere_3_intersection_tester< CGAL::Epick >(r, true /*exact predicates*/).run(); Sphere_3_intersection_tester< CGAL::Epick >(r, true /*exact predicates*/).run();
@ -181,8 +180,8 @@ int main(int, char**)
std::cout << " |||||||| Test EPECK ||||||||" << std::endl; std::cout << " |||||||| Test EPECK ||||||||" << std::endl;
Sphere_3_intersection_tester< CGAL::Epeck >(r, true /*exact predicates*/, true /*exact constructions*/).run(); Sphere_3_intersection_tester< CGAL::Epeck >(r, true /*exact predicates*/, true /*exact constructions*/).run();
// std::cout << " |||||||| Test CGAL::Homogeneous<CGAL::Epeck_ft> ||||||||" << std::endl; std::cout << " |||||||| Test CGAL::Homogeneous<CGAL::Epeck_ft> ||||||||" << std::endl;
// Sphere_3_intersection_tester< CGAL::Homogeneous<CGAL::Epeck_ft> >(r, true /*exact predicates*/, true /*exact constructions*/).run(); Sphere_3_intersection_tester< CGAL::Homogeneous<CGAL::Epeck_ft> >(r, true /*exact predicates*/, true /*exact constructions*/).run();
std::cout << "OK!" << std::endl; std::cout << "OK!" << std::endl;
} }