Subject: CGAL users discussion list
List archive
- From: annie <>
- To:
- Subject: [cgal-discuss] Re: CGAL:: accessing vertices of segment Delaunay graph?
- Date: Thu, 14 Oct 2010 08:49:27 -0700 (PDT)
Hi,
Thank you for response, Sebastien;)
As you suggested I looked at the implementation of primal and draw_dual_edge
functions. The way I used it is as follows:
for (int k = 1; eit != sdg.finite_edges_end(); ++eit, ++k) {
SDG2::Edge e = *eit;
CGAL::Object o = sdg.primal(e);
Segment s;
if (CGAL::assign(s, o)) {
cout <<s<<s.source()<<s.target()<<endl;
}else cout<<s<<endl;
}
A little legend (in case of need):
Segment is CGAL::Segment_2<CK>,
CK is CGAL::Simple_cartesian<double>,
SDG2 is CGAL::Segment_Delaunay_graph_2<Gt> ,
Gt is CGAL::Segment_Delaunay_graph_filtered_traits_2<CK,
CGAL::Field_with_sqrt_tag, EK, CGAL::Field_tag> ,
EK is CGAL::Simple_cartesian<ENT>,
ENT is CGAL::Quotient<CGAL::MP_Float>.
What I get?
Looks like segments representing edges (I hope). Source and target give
access to coordinates I can see writing s in the code above.
CGAL::assign(s, o) returns false when I get duplicate edges' coordinates.
But it's a little strange I think, shouldn't this iterator give unique
edges?
And are my results really edges' coordinates - I mean points that build up
triangles of Delaunay triangulation?
I will be very grateful for any help again. As you can see, I'm really
newbie in that matter... ;)
PS.
I looked through cgal documentation for segment 2d again. My first idea of
looking for vertices' coordinates was to use Finite_vertice_iterator. It's a
little confusing to me but seems like Vertex object doesn't store its
coordinates. Documentation states: ' A vertex stores a site of the segment
Delaunay graph and provides access to one of its incident faces through a
Face_handle.' So it's not a vertex point by means of Delaunay graph, just
information to which site this point belongs... Correct me if I'm wrong or
there is a way to extract coordinates simply from iterator for vertices.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-accessing-vertices-of-segment-Delaunay-graph-tp2992409p2995571.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [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.