// file: examples/Sweep_line_2/example4.C #include "short_names.h" #include #include #include #include #include #include #include typedef CGAL::Quotient NT; typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits; typedef Traits::Point_2 Point_2; typedef Traits::Curve_2 Curve_2; typedef std::vector CurveList; typedef CurveList::iterator CurveListIter; typedef CGAL::Sweep_line_2 Sweep_line; int main() { std::vector segments; Sweep_line sl; std::cout << "Demonstrating Sweep_line_2::do_curves_intersect " << std::endl; // case 1 Curve_2 c1(Point_2(10,1), Point_2(20,1)); Curve_2 c2(Point_2(10, -4), Point_2(20,6)); segments.push_back(c1); segments.push_back(c2); bool b = sl.do_curves_intersect(segments.begin(),segments.end()); std::cout << "Curves: " << std::endl << segments[0] << std::endl << segments[1] << std::endl; if (b) std::cout << "Curves intersect"<