Проблемы с библиотекой CGAL Vertex_visibility_graph_2.h

У меня проблемы с библиотекой CGAL Vertex_visibility_graph_2.h, для графиков видимости.
Код, который я пробую, выглядит следующим образом:

    typedef CGAL::Cartesian<CGAL::Gmpq> Kernel;
typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
typedef CGAL::Vertex_visibility_graph_2<Traits_2> Vis_graph;
typedef CGAL::Polygon_2<Kernel> Polygon_2;

Vis_graph graph(polygon.vertices_begin(), polygon.vertices_end());

Но когда я пытаюсь скомпилировать, я получаю ошибку:

/opt/local/include/CGAL/Partition_2/Vertex_visibility_graph_2_impl.h:528:30: error:
no matching function for call to object of type 'Intersect_2' (aka
'CGAL::Arr_segment_traits_2<CGAL::Cartesian<CGAL::Gmpq>>::Intersect_2')

Кто-нибудь использовал эту библиотеку раньше?

0

Решение

Вам необходимо заменить:
typedef CGAL::Vertex_visibility_graph_2<Traits_2> Vis_graph;
от
typedef CGAL::Vertex_visibility_graph_2<Kernel> Vis_graph;

2

Другие решения

Других решений пока нет …