Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] CGAL:: accessing vertices of segment Delaunay graph?
- Date: Wed, 13 Oct 2010 09:56:15 +0200
annie wrote:
Hello, I'm stuck with trying to get vertices of segment Delaunay graph. I was trying to iterate through the non-infinite edges of the segment Delaunay graph as in the sample in CGAL, trying this inside the loop: SDG2::Edge e = *eit; cout<<*( e.first->vertex( sdg.ccw(e.second) )); cout<<*( e.first->vertex( sdg.cw(e.second) )); The code gives nothing as result, only segments that points belong to are written if I also use ->site() method. But I'm interested in endpoints of edges ... I get similar result using Finite_vertices_iterator. Did anyone try to get these vertices? Please, I would be very grateful for help...
I don't know this package very well, but looking at the code
of the draw_dual function you have:
template< class Stream >
Stream& draw_dual_edge(Edge e, Stream& str) const
{
CGAL_precondition( !is_infinite(e) );
typename Geom_traits::Line_2 l;
typename Geom_traits::Segment_2 s;
typename Geom_traits::Ray_2 r;
CGAL::Parabola_segment_2<Gt> ps;
CGAL::Object o = CGAL::primal(e);
if (CGAL::assign(l, o)) str << l;
if (CGAL::assign(s, o)) str << s;
if (CGAL::assign(r, o)) str << r;
if (CGAL::assign(ps, o)) ps.draw(str);
return str;
}
primal and Parabola_segment_2 are not documented but while people knowing a documented answer, it may help.
S.
- [cgal-discuss] CGAL:: accessing vertices of segment Delaunay graph?, annie, 10/12/2010
- Re: [cgal-discuss] CGAL:: accessing vertices of segment Delaunay graph?, Sebastien Loriot (GeometryFactory), 10/13/2010
- [cgal-discuss] Re: CGAL:: accessing vertices of segment Delaunay graph?, annie, 10/14/2010
- [cgal-discuss] Re: CGAL:: accessing vertices of segment Delaunay graph?, annie, 10/18/2010
- [cgal-discuss] Re: CGAL:: accessing vertices of segment Delaunay graph?, annie, 10/14/2010
- Re: [cgal-discuss] CGAL:: accessing vertices of segment Delaunay graph?, Sebastien Loriot (GeometryFactory), 10/13/2010
Archive powered by MHonArc 2.6.16.