Subject: CGAL users discussion list
List archive
- From: Pierre Alliez <>
- To:
- Subject: Re: [cgal-discuss] Tracking vertex properties
- Date: Wed, 09 Apr 2008 18:29:22 +0200
- Organization: INRIA Sophia Antipolis - Méditerranée
hi Tim,
If your vertex is an enriched vertex, ie derived from the base vertex, you can add a member
variable there, say an index into a color palette.
When you insert a point into the triangulation, you get a Vertex_handle, ie
Vertex_handle v = insert(p);
you can then specify an attribute by calling eg
v->index() = index;
your elimination algorithm will be able to access the index as well.
Tim Keitt a écrit :
I need to make a triangulation of points where each point has a color.
When I'm done, I want to extract the triangulation and eliminate edges
that have the same color on each end. This is my first attempt at
using CGAL, so I am a little confused about how I can keep track of
the identity of a vertex (or its properties) once it has been inserted
into eg a Delaunay object. If I insert points as triples (x, y, color)
will I then have access to the color when I iterate over edges in the
triangulation?
I was looking at the example:
http://www.cgal.org/Manual/3.3/examples/Triangulation_2/terrain.cpp
and noticed that the input file "data/terrain.cin" has four columns.
(It appears you have to download the entire source in order to find
this out -- a link in the HTML docs would be welcome!) What is the
fourth column? Is that what I am looking for?
THK
- Tracking vertex properties, Tim Keitt, 04/09/2008
- Re: [cgal-discuss] Tracking vertex properties, Pierre Alliez, 04/09/2008
- Re: [cgal-discuss] Tracking vertex properties, Laurent Rineau, 04/09/2008
Archive powered by MHonArc 2.6.16.