From 081c51050791e3d9f9ad8aa48d4788b67687543a Mon Sep 17 00:00:00 2001 From: Baruch Zukerman Date: Tue, 17 Oct 2006 14:11:29 +0000 Subject: [PATCH] construct_projected_boudary has changed --- Envelope_3/include/CGAL/Env_plane_traits_3.h | 6 ++--- Envelope_3/include/CGAL/Env_sphere_traits_3.h | 8 +++--- .../include/CGAL/Env_triangle_traits_3.h | 10 ++++---- .../Envelope_divide_and_conquer_3.h | 25 ++++++++++--------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Envelope_3/include/CGAL/Env_plane_traits_3.h b/Envelope_3/include/CGAL/Env_plane_traits_3.h index 46cee2b12af..d4a384c80ed 100644 --- a/Envelope_3/include/CGAL/Env_plane_traits_3.h +++ b/Envelope_3/include/CGAL/Env_plane_traits_3.h @@ -319,8 +319,8 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 const Plane_3& h = s.plane(); Line_2 proj_line(h.a(), h.b(), h.d()); - *o++ = std::make_pair(make_object(X_monotone_curve_2(proj_line)), - ON_ORIENTED_BOUNDARY); + *o++ = make_object(std::make_pair(X_monotone_curve_2(proj_line), + ON_ORIENTED_BOUNDARY)); return o; } @@ -331,7 +331,7 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 Comparison_result res = k.compare_xy_2_object()(p1, p2); Oriented_side side = (res == SMALLER) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE; - *o++ = std::make_pair(make_object(X_monotone_curve_2(s.line())), side); + *o++ = make_object(std::make_pair(X_monotone_curve_2(s.line()), side)); return o; } }; diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index d4a21a51293..468007df00e 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -138,14 +138,14 @@ public: if(cv1.is_lower()) { CGAL_assertion(cv2.is_upper()); - *o++ = std::make_pair(make_object(cv1), ON_POSITIVE_SIDE); - *o++ = std::make_pair(make_object(cv2), ON_NEGATIVE_SIDE); + *o++ = make_object(std::make_pair(cv1, ON_POSITIVE_SIDE)); + *o++ = make_object(std::make_pair(cv2, ON_NEGATIVE_SIDE)); } else { CGAL_assertion(cv2.is_lower()); - *o++ = std::make_pair(make_object(cv1), ON_NEGATIVE_SIDE); - *o++ = std::make_pair(make_object(cv2), ON_POSITIVE_SIDE); + *o++ = make_object(std::make_pair(cv1, ON_NEGATIVE_SIDE)); + *o++ = make_object(std::make_pair(cv2, ON_POSITIVE_SIDE)); } return o; diff --git a/Envelope_3/include/CGAL/Env_triangle_traits_3.h b/Envelope_3/include/CGAL/Env_triangle_traits_3.h index e6e39119d5d..04737dcbf20 100644 --- a/Envelope_3/include/CGAL/Env_triangle_traits_3.h +++ b/Envelope_3/include/CGAL/Env_triangle_traits_3.h @@ -551,9 +551,9 @@ public: s2 != ON_ORIENTED_BOUNDARY && s3 != ON_ORIENTED_BOUNDARY); - *o++ = std::make_pair(make_object(A), s1); - *o++ = std::make_pair(make_object(B), s2); - *o++ = std::make_pair(make_object(C), s3); + *o++ = make_object(std::make_pair(A, s1)); + *o++ = make_object(std::make_pair(B, s2)); + *o++ = make_object(std::make_pair(C, s3)); } else { @@ -566,8 +566,8 @@ public: b2 = parent->project(a2); CGAL_assertion(b1 != b2); - *o++ = std::make_pair(make_object(X_monotone_curve_2(b1, b2)), - ON_ORIENTED_BOUNDARY); + *o++ = make_object(std::make_pair(X_monotone_curve_2(b1, b2), + ON_ORIENTED_BOUNDARY)); } return o; } diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h index 082555c09c5..47ff92e2511 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h @@ -299,29 +299,30 @@ protected: void deal_with_one_surface(Xy_monotone_surface_3& surf, Minimization_diagram_2& result) { - typedef std::list > Boundary_list; - typedef typename Boundary_list::iterator Boundary_iterator; + typedef std::list Boundary_list; + typedef std::pair Boundary_xcurve; + typedef Boundary_list::iterator Boundary_iterator; - Boundary_list boundary_xcurves; - traits->construct_projected_boundary_2_object()(surf, std::back_inserter(boundary_xcurves)); + Boundary_list boundary; + traits->construct_projected_boundary_2_object()(surf, std::back_inserter(boundary)); - if(boundary_xcurves.empty()) + if(boundary.empty()) { //one infinite surface result.unbounded_face()->set_data(surf); return; } - for(Boundary_iterator boundary_it = boundary_xcurves.begin(); - boundary_it != boundary_xcurves.end(); + for(Boundary_iterator boundary_it = boundary.begin(); + boundary_it != boundary.end(); ++boundary_it) { - const Object& obj = boundary_it->first; - X_monotone_curve_2 cv; - if(assign(cv, obj)) + const Object& obj = *boundary_it; + Boundary_xcurve boundary_cv; + if(assign(boundary_cv, obj)) { - Oriented_side side = boundary_it->second; - Halfedge_handle he = insert_non_intersecting_curve(result, cv); + Oriented_side side = boundary_cv.second; + Halfedge_handle he = insert_non_intersecting_curve(result, boundary_cv.first); if(side == ON_ORIENTED_BOUNDARY) {