Subject: CGAL users discussion list
List archive
- From: Kneuss <>
- To:
- Subject: [cgal-discuss] Iterate in a Polygon List
- Date: Fri, 13 Nov 2009 19:52:52 +0100 (CET)
Hi All,
I want to iterate in a Polygon-List to finally get the vertices (after that, I
will
draw in OGL).
Unfortunately, I get the following error :
/media/nas_media_for_all/A U T O C A L
C_13_11_09/AC_Moteur/../AC_Polygon/ac_polygon.cpp:202: erreur: conversion from
«std::_List_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > >» to non-scalar type
«__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >*,
std::vector<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >,
std::allocator<CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> > > > >» requested
My code is here :
void AC_Polygon::drawPartition() const
{
for (Polygon_iterator poly_it = this->partionsOfPolygon.begin(); poly_it !=
this->partionsOfPolygon.end();poly_it++)
{
Vertex_iterator it=(*poly_it).vertices_begin(); // HERE THE ERROR
}
}
The type Vertex_iterator is defined as following :
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Partition_traits_2<K> Traits;
typedef Traits::Point_2 Point_2;
typedef Traits::Polygon_2 Polygon_2;
typedef Polygon_2::Vertex_iterator Vertex_iterator;
typedef std::list<Polygon_2> Polygon_list;
typedef CGAL::Creator_uniform_2<int, Point_2> Creator;
typedef CGAL::Random_points_in_square_2<Point_2, Creator> Point_generator;
typedef std::list<Polygon_2>::const_iterator Polygon_iterator;
Any clue ?
Looking forward for answer !
Gilles
- [cgal-discuss] Iterate in a Polygon List, Kneuss, 11/13/2009
Archive powered by MHonArc 2.6.16.