added handling of z_at_inf to compare_xyz

This commit is contained in:
Eric Berberich 2008-02-11 15:57:50 +00:00
parent d0274f1555
commit 903bcce361
1 changed files with 26 additions and 1 deletions

View File

@ -323,7 +323,32 @@ public:
compare_xy_2_object()(p1, p2)
);
if (res == CGAL::EQUAL) {
if (p1.is_z_at_infinity()) {
if (p2.is_z_at_infinity()) {
CGAL::Arr_curve_end z1 = p1.z_infinity();
CGAL::Arr_curve_end z2 = p2.z_infinity();
if (z1 == z2) {
return EQUAL;
} else {
return (z1 == CGAL::ARR_MIN_END ?
CGAL::SMALLER : CGAL::LARGER);
}
} else {
CGAL::Arr_curve_end z1 = p1.z_infinity();
return (z1 == CGAL::ARR_MIN_END ?
CGAL::SMALLER : CGAL::LARGER);
}
} else {
if (p2.is_z_at_infinity()) {
CGAL::Arr_curve_end z2 = p2.z_infinity();
return (z2 == CGAL::ARR_MIN_END ?
CGAL::LARGER : CGAL::SMALLER);
}
}
// else both finite!
typedef typename Curved_kernel_via_analysis_2l::Surface_pair_3
Surface_pair_3;
typedef typename Surface_pair_3::Surface_3 Surface_3;