// examples/Arrangement_2/example12 // -------------------------------- // Shorten long names for problematic compilers (e.g., MSVC): #include "short_names.h" #include #include #include #include #include #include #include #include #include typedef CGAL::Quotient NT; typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_polyline_traits Traits; typedef Traits::Point_2 Point; typedef Traits::Curve_2 Curve; typedef CGAL::Arr_2_default_dcel Dcel; typedef CGAL::Arr_base_node Base_node; typedef CGAL::Arrangement_2 Arr; typedef CGAL::Arr_file_writer Arr_writer; CGAL_BEGIN_NAMESPACE std::ostream & operator<<(std::ostream & os, const Curve & cv) { typedef Curve::const_iterator Points_iterator; os << cv.size() << std::endl; for (Points_iterator points_iter = cv.begin(); points_iter != cv.end(); points_iter++) os << " " << *points_iter; return os; } std::istream & operator>>(std::istream & in, Curve & cv) { std::size_t size; unsigned int i; in >> size; for (i = 0; i < size; i++){ Point p; in >> p; cv.push_back(p); } return in; } CGAL_END_NAMESPACE int main() { Arr arr; std::cin >> arr; std::cout << " * * * Printing list of all halfedges " << "of the resulting Arrangement" << std::endl; Arr_writer verbose_writer(std::cout, arr, true); verbose_writer.write_halfedges(arr.halfedges_begin(), arr.halfedges_end()); return 0; }