mirror of https://github.com/CGAL/cgal
Fix for cases where red and blue handles are differently typed
This commit is contained in:
parent
901f52018c
commit
36a210065f
|
|
@ -59,12 +59,20 @@ public:
|
||||||
|
|
||||||
std::size_t min_end_index (const Curve& c) const
|
std::size_t min_end_index (const Curve& c) const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<std::size_t>(halfedge(c)->target()->inc());
|
if (c.red_halfedge_handle() != typename Curve::HH_red())
|
||||||
|
return reinterpret_cast<std::size_t>(c.red_halfedge_handle()->target()->inc());
|
||||||
|
// else
|
||||||
|
CGAL_assertion (c.blue_halfedge_handle() != typename Curve::HH_blue());
|
||||||
|
return reinterpret_cast<std::size_t>(c.blue_halfedge_handle()->target()->inc());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t max_end_index (const Curve& c) const
|
std::size_t max_end_index (const Curve& c) const
|
||||||
{
|
{
|
||||||
return reinterpret_cast<std::size_t>(halfedge(c)->source()->inc());
|
if (c.red_halfedge_handle() != typename Curve::HH_red())
|
||||||
|
return reinterpret_cast<std::size_t>(c.red_halfedge_handle()->source()->inc());
|
||||||
|
// else
|
||||||
|
CGAL_assertion (c.blue_halfedge_handle() != typename Curve::HH_blue());
|
||||||
|
return reinterpret_cast<std::size_t>(c.blue_halfedge_handle()->source()->inc());
|
||||||
}
|
}
|
||||||
|
|
||||||
const Curve& curve (const Curve& c) const
|
const Curve& curve (const Curve& c) const
|
||||||
|
|
@ -103,16 +111,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
typename Curve::Halfedge_handle halfedge (const Curve& c) const
|
|
||||||
{
|
|
||||||
if (c.red_halfedge_handle() == typename Curve::Halfedge_handle())
|
|
||||||
{
|
|
||||||
CGAL_assertion (c.blue_halfedge_handle() != typename Curve::Halfedge_handle());
|
|
||||||
return c.blue_halfedge_handle();
|
|
||||||
}
|
|
||||||
// else
|
|
||||||
return c.red_halfedge_handle();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! Compute the overlay of two input arrangements.
|
/*! Compute the overlay of two input arrangements.
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,8 @@ public:
|
||||||
class Ex_x_monotone_curve_2 {
|
class Ex_x_monotone_curve_2 {
|
||||||
public:
|
public:
|
||||||
typedef Base_x_monotone_curve_2 Base;
|
typedef Base_x_monotone_curve_2 Base;
|
||||||
typedef Halfedge_handle_blue Halfedge_handle;
|
typedef Halfedge_handle_red HH_red;
|
||||||
|
typedef Halfedge_handle_blue HH_blue;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Base m_base_xcv; // The base curve.
|
Base m_base_xcv; // The base curve.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue