Код: Выделить всё
template
class K_VisArr_segment;
template
class K_VisArr_segment_traits : public CGAL::Arr_segment_traits_2 {
friend class K_VisArr_segment;
public:
typedef CGAL::Arr_segment_traits_2 Superclass;
typedef typename Kernel_::Point_2 Point_2;
typedef K_VisArr_segment X_monotone_curve_2;
typedef K_VisArr_segment Curve_2;
};
template
class K_VisArr_segment : public K_VisArr_segment_traits::_Segment_cached_2 {
typedef typename K_VisArr_segment_traits::_Segment_cached_2 Base;
typedef typename Kernel_::Segment_2 Segment_2;
typedef typename Kernel_::Point_2 Point_2;
typedef typename Kernel_::Line_2 Line_2;
private:
int id_;
public:
K_VisArr_segment(const typename Segment_2& seg) : Base(seg) {
this.id_ = seg.id();
}
int id() const { return id_; }
int& id() { return id_; }
};
Код: Выделить всё
template
class Arr_segment_2;
template
class Arr_segment_traits_2 : public Kernel_ {
friend class Arr_segment_2;
public:
// Traits objects
typedef typename Kernel::Point_2 Point_2;
typedef Arr_segment_2 X_monotone_curve_2;
typedef Arr_segment_2 Curve_2;
typedef unsigned int Multiplicity;
Код: Выделить всё
using MK = typename K_Vis_Kernel;
using Traits = typename K_VisArr_segment_traits;
using Arrangement = CGAL::Arrangement_2;
'CGAL::Sign CGAL::Arr_segment_traits_2::Compare_y_at_x_2::operator ()(const CGAL::Point_2 & ,const CGAL::Arr_segment_2 &) const': невозможно преобразовать аргумент 2 из 'const K_VisArr_segment' в 'const CGAL::Arr_segment_2 &'
Так что , похоже, функция сравнения все еще использует старую версию X_monotone_curve_2. Фрагмент функции CGAL comapre в Arr_traits_adaptor_2.h:
Код: Выделить всё
Comparison_result compare_y_at_x(const Point_2& p,
const X_monotone_curve_2& xcv,
Arr_all_sides_oblivious_tag,
Arr_all_sides_oblivious_tag) const {
const Base& base = m_self;
auto cmp_y_at_x = base.compare_y_at_x_2_object();
return cmp_y_at_x(p, xcv);
}
Подробнее здесь: https://stackoverflow.com/questions/783 ... edef-in-pa