mirror of https://github.com/CGAL/cgal
Fix Interpolation
This commit is contained in:
parent
008752cedc
commit
3da3481263
|
|
@ -291,6 +291,24 @@ public:
|
|||
typedef typename Rep::Less_distance_to_point_3 Less_distance_to_point_2;
|
||||
typedef typename Rep::Compute_squared_distance_3 Compute_squared_distance_2;
|
||||
|
||||
struct Compare_xy_2 {
|
||||
Compare_x_2 cx_2;
|
||||
Compare_y_2 cy_2;
|
||||
|
||||
Compare_xy_2(const Compare_x_2& cx_2, const Compare_y_2& cy_2)
|
||||
: cx_2(cx_2), cy_2(cy_2)
|
||||
{}
|
||||
|
||||
Comparison_result operator()(const Point_2& p, const Point_2& q) const
|
||||
{
|
||||
Comparison_result res = cx_2(p, q);
|
||||
if (res == EQUAL) {
|
||||
return cy_2(p, q);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
//instantiations and creation of functors:
|
||||
//for the triangulation:
|
||||
Orientation_2
|
||||
|
|
@ -312,6 +330,10 @@ public:
|
|||
compare_y_2_object() const
|
||||
{ return Compare_y_2(normal); }
|
||||
|
||||
Compare_xy_2
|
||||
compare_xy_2_object() const
|
||||
{ return Compare_xy_2(compare_x_2_object(), compare_y_2_object()); }
|
||||
|
||||
Less_x_2
|
||||
less_x_2_object() const
|
||||
{ return compare_to_less(compare_x_2_object()); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue