construct_projected_boudary has changed

This commit is contained in:
Baruch Zukerman 2006-10-17 14:11:29 +00:00
parent 852399875b
commit 081c510507
4 changed files with 25 additions and 24 deletions

View File

@ -319,8 +319,8 @@ class Env_plane_traits_3 : public Arr_linear_traits_2<Kernel_>
const Plane_3& h = s.plane(); const Plane_3& h = s.plane();
Line_2 proj_line(h.a(), h.b(), h.d()); Line_2 proj_line(h.a(), h.b(), h.d());
*o++ = std::make_pair(make_object(X_monotone_curve_2(proj_line)), *o++ = make_object(std::make_pair(X_monotone_curve_2(proj_line),
ON_ORIENTED_BOUNDARY); ON_ORIENTED_BOUNDARY));
return o; return o;
} }
@ -331,7 +331,7 @@ class Env_plane_traits_3 : public Arr_linear_traits_2<Kernel_>
Comparison_result res = k.compare_xy_2_object()(p1, p2); Comparison_result res = k.compare_xy_2_object()(p1, p2);
Oriented_side side = (res == SMALLER) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE; 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; return o;
} }
}; };

View File

@ -138,14 +138,14 @@ public:
if(cv1.is_lower()) if(cv1.is_lower())
{ {
CGAL_assertion(cv2.is_upper()); CGAL_assertion(cv2.is_upper());
*o++ = std::make_pair(make_object(cv1), ON_POSITIVE_SIDE); *o++ = make_object(std::make_pair(cv1, ON_POSITIVE_SIDE));
*o++ = std::make_pair(make_object(cv2), ON_NEGATIVE_SIDE); *o++ = make_object(std::make_pair(cv2, ON_NEGATIVE_SIDE));
} }
else else
{ {
CGAL_assertion(cv2.is_lower()); CGAL_assertion(cv2.is_lower());
*o++ = std::make_pair(make_object(cv1), ON_NEGATIVE_SIDE); *o++ = make_object(std::make_pair(cv1, ON_NEGATIVE_SIDE));
*o++ = std::make_pair(make_object(cv2), ON_POSITIVE_SIDE); *o++ = make_object(std::make_pair(cv2, ON_POSITIVE_SIDE));
} }
return o; return o;

View File

@ -551,9 +551,9 @@ public:
s2 != ON_ORIENTED_BOUNDARY && s2 != ON_ORIENTED_BOUNDARY &&
s3 != ON_ORIENTED_BOUNDARY); s3 != ON_ORIENTED_BOUNDARY);
*o++ = std::make_pair(make_object(A), s1); *o++ = make_object(std::make_pair(A, s1));
*o++ = std::make_pair(make_object(B), s2); *o++ = make_object(std::make_pair(B, s2));
*o++ = std::make_pair(make_object(C), s3); *o++ = make_object(std::make_pair(C, s3));
} }
else else
{ {
@ -566,8 +566,8 @@ public:
b2 = parent->project(a2); b2 = parent->project(a2);
CGAL_assertion(b1 != b2); CGAL_assertion(b1 != b2);
*o++ = std::make_pair(make_object(X_monotone_curve_2(b1, b2)), *o++ = make_object(std::make_pair(X_monotone_curve_2(b1, b2),
ON_ORIENTED_BOUNDARY); ON_ORIENTED_BOUNDARY));
} }
return o; return o;
} }

View File

@ -299,29 +299,30 @@ protected:
void deal_with_one_surface(Xy_monotone_surface_3& surf, Minimization_diagram_2& result) void deal_with_one_surface(Xy_monotone_surface_3& surf, Minimization_diagram_2& result)
{ {
typedef std::list<std::pair<Object, Oriented_side> > Boundary_list; typedef std::list<Object> Boundary_list;
typedef typename Boundary_list::iterator Boundary_iterator; typedef std::pair<X_monotone_curve_2, Oriented_side> Boundary_xcurve;
typedef Boundary_list::iterator Boundary_iterator;
Boundary_list boundary_xcurves; Boundary_list boundary;
traits->construct_projected_boundary_2_object()(surf, std::back_inserter(boundary_xcurves)); traits->construct_projected_boundary_2_object()(surf, std::back_inserter(boundary));
if(boundary_xcurves.empty()) if(boundary.empty())
{ {
//one infinite surface //one infinite surface
result.unbounded_face()->set_data(surf); result.unbounded_face()->set_data(surf);
return; return;
} }
for(Boundary_iterator boundary_it = boundary_xcurves.begin(); for(Boundary_iterator boundary_it = boundary.begin();
boundary_it != boundary_xcurves.end(); boundary_it != boundary.end();
++boundary_it) ++boundary_it)
{ {
const Object& obj = boundary_it->first; const Object& obj = *boundary_it;
X_monotone_curve_2 cv; Boundary_xcurve boundary_cv;
if(assign(cv, obj)) if(assign(boundary_cv, obj))
{ {
Oriented_side side = boundary_it->second; Oriented_side side = boundary_cv.second;
Halfedge_handle he = insert_non_intersecting_curve(result, cv); Halfedge_handle he = insert_non_intersecting_curve(result, boundary_cv.first);
if(side == ON_ORIENTED_BOUNDARY) if(side == ON_ORIENTED_BOUNDARY)
{ {