Subject: CGAL users discussion list
List archive
- From: Peter Hachenberger <>
- To:
- Subject: Re: [cgal-discuss] Halfedge::vertex_begin()
- Date: Mon, 12 Nov 2007 14:26:29 +0100
On Sat, 2007-11-10 at 17:36 -0800, Peter Schröder wrote:
> Assuming that I am not changing a Polyhedron_3 data structure with any
> topological operations, will I always get the same edge when calling
> vertex_begin()? Given a vertex I need to consistently identify a "first"
> edge incident on it. vertex_begin() would serve this as long as it
> always returns the same edge. What are the guarantees? Can a similar
> thing be asserted about vertex->halfedge()? I just need to consistently
> get the same edge.
>
> Peter
Hi Peter,
the procedure Halfedge::vertex_begin() returns a Circulator starting
with Vertex::halfedge(). That is an implementation detail that will not
change. If you want to make sure that this will always be the case for
your code, you can instead define a new circulator as follows:
Halfedge_around_vertex_circulator eavc(v->halfedge());
The halfedge returned by Vertex::halfedge stays the same as long as the
halfedges incident to that vertex stay the same. So, if you don't do any
topological operations, there should be no change.
Peter
- Halfedge::vertex_begin(), Peter Schröder, 11/11/2007
- Re: [cgal-discuss] Halfedge::vertex_begin(), Peter Hachenberger, 11/12/2007
Archive powered by MHonArc 2.6.16.