// 3D intersection tests. // We want to check that no division is performed for interface macro Do_intersect_3_RT #define CGAL_NO_MPZF_DIVISION_OPERATOR // Point_3_X with X < Point (lexicographically) are tested in other files #include #include #include #include #include #include #include #include "intersection_test_helper.h" #include #include #include #include #include #include #include #include #include template struct Point_3_intersection_tester : public Intersection_3_tester { typedef Intersection_3_tester Base; typedef typename K::FT FT; typedef CGAL::Iso_cuboid_3 Cub; typedef CGAL::Line_3 L; typedef CGAL::Point_3 P; typedef CGAL::Plane_3 Pl; typedef CGAL::Ray_3 R; typedef CGAL::Segment_3 S; typedef CGAL::Sphere_3 Sph; typedef CGAL::Tetrahedron_3 Tet; typedef CGAL::Triangle_3 Tr; typedef CGAL::Vector_3 V; using Base::p; using Base::pl; using Base::random_point; using Base::check_do_intersect; using Base::check_do_not_intersect; using Base::check_intersection; using Base::check_no_intersection; private: int N = 1000; public: Point_3_intersection_tester(CGAL::Random& r, const bool has_exact_p = false, const bool has_exact_c = false) : Base(r, has_exact_p, has_exact_c) { } public: void P_P() { std::cout << "Point - Point\n"; P p(0.99,0.99,0.99); check_intersection(p,p,p); P q = random_point(); check_no_intersection(p,q); } void P_R() { std::cout << "Point - Ray\n"; P pt(1,1,1); R ray(p(-1,-1,-1), p(3,3,3)); check_intersection(ray, pt, pt); if(this->has_exact_c && std::is_same::value) { for(int i=0; ihas_exact_c && std::is_same::value) { for(int i=0; ihas_exact_c && std::is_same::value) { for(int i=0; i ||||||||" << std::endl; Point_3_intersection_tester< CGAL::Simple_cartesian >(r).run(); std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; Point_3_intersection_tester< CGAL::Homogeneous >(r).run(); std::cout << " |||||||| Test EPICK ||||||||" << std::endl; Point_3_intersection_tester< CGAL::Epick >(r, true /*exact predicates*/).run(); std::cout << " |||||||| Test EPECK ||||||||" << std::endl; Point_3_intersection_tester< CGAL::Epeck >(r, true /*exact predicates*/, true /*exact constructions*/).run(); std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; Point_3_intersection_tester< CGAL::Homogeneous >(r, true /*exact predicates*/, true /*exact constructions*/).run(); std::cout << "OK!" << std::endl; }