Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] Extra data for points
- Date: Tue, 01 Dec 2009 20:43:43 +0100
James Le Cuirot wrote:
Hi,
I want to attach a string to each point that I'm passing into a
Delaunay Triangulation. I need to be able to access this string when
iterating through the edges later on. I thought that subclassing the
Point_2 class was the way to go but when I obtain the segment and
consequently the point, that information appears to be lost. I guess
this is because you get a copy of the point rather than a pointer to
the actual instance you passed in. What is the proper way to do this? I
saw some things in the manual like property maps that sounded like they
might be what I need but they were discussed in a different context so
I wasn't sure.
Thanks,
James
Hi James,
You might store the extra information in the vertex by using the class
Triangulation_vertex_base_with_info_2
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_2_ref/Class_Triangulation_vertex_base_with_info_2.html
andreas
- [cgal-discuss] Extra data for points, James Le Cuirot, 12/01/2009
- Re: [cgal-discuss] Extra data for points, Andreas Fabri, 12/01/2009
- Re: [cgal-discuss] Extra data for points, James Le Cuirot, 12/03/2009
- Re: [cgal-discuss] Extra data for points, Andreas Fabri, 12/01/2009
Archive powered by MHonArc 2.6.16.