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();
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<Kernel_>
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;
}
};

View File

@ -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;

View File

@ -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;
}

View File

@ -299,29 +299,30 @@ protected:
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 typename Boundary_list::iterator Boundary_iterator;
typedef std::list<Object> Boundary_list;
typedef std::pair<X_monotone_curve_2, Oriented_side> 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)
{