diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h index 45a2f9dd9fb..cf334475335 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h @@ -36,8 +36,8 @@ do_intersect(const typename K::Ray_3& r1, 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 stp0 = pred(r2.source(), r2.second_point(), r1.point(0)); + CGAL::Orientation p0p1s = pred(r1.source(), r1.second_point(), r2.source()); + CGAL::Orientation stp0 = pred(r2.source(), r2.second_point(), r1.source()); if(p0p1s == COLLINEAR) { @@ -49,7 +49,7 @@ do_intersect(const typename K::Ray_3& r1, } 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); } diff --git a/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp index e67bd82de7f..e1d603d4a5e 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp @@ -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(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 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)); // Segment - // @fixme -// 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))); -// 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))); + 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); + 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); // Ray check_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(3,0,0)), diff --git a/Intersections_3/test/Intersections_3/test_intersections_Sphere_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Sphere_3.cpp index a4a2e255d86..62ecc427419 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Sphere_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Sphere_3.cpp @@ -171,9 +171,8 @@ int main(int, char**) std::cout << " |||||||| Test Simple_cartesian ||||||||" << std::endl; Sphere_3_intersection_tester< CGAL::Simple_cartesian >(r).run(); - // @fixme illegal Plane_3 constructor in Cartesian_kernel::Construct_radical_plane_3 -// std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; -// Sphere_3_intersection_tester< CGAL::Homogeneous >(r).run(); + std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; + Sphere_3_intersection_tester< CGAL::Homogeneous >(r).run(); std::cout << " |||||||| Test EPICK ||||||||" << std::endl; 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; Sphere_3_intersection_tester< CGAL::Epeck >(r, true /*exact predicates*/, true /*exact constructions*/).run(); -// std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; -// Sphere_3_intersection_tester< CGAL::Homogeneous >(r, true /*exact predicates*/, true /*exact constructions*/).run(); + std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; + Sphere_3_intersection_tester< CGAL::Homogeneous >(r, true /*exact predicates*/, true /*exact constructions*/).run(); std::cout << "OK!" << std::endl; }