Subject: CGAL users discussion list
List archive
- From: Olivier Devillers <>
- To:
- Subject: Re: [cgal-discuss] How to explore all edges of all cells incident
- Date: Wed, 15 Oct 2008 15:25:37 +0200
a écrit :
Hello,from
I would like to know what is the most efficient way to explore all edges of
all
cells neighbor to a vertex v in a triangulation_3. Currently, I put incident
vertices of v into a vector ( by:
T.incident_vertices(v,back_inserter(neighbour_vertices)) ), I add v to the
vector, and I check all pairs of vertices in this vector to see if they are
connected by an edge in the triangulation or not( by: T.is_edge(...) ), I
wonder if there is any more efficient way to to it?
I would appreciate any help,
Ehsan Aganj
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Triangulation_3_ref/Class_Triangulation_3.html
you have
template <class OutputIterator>
OutputIterator t.incident_cells ( Vertex_handle v, OutputIterator cells)
Copies the Cell_handles of all cells incident to v to the output iterator cells. If t.dimension() <3, then do nothing. Returns the resulting output iterator.
Precondition: v Vertex_handle(), t.is_vertex(v).
template <class OutputIterator>
OutputIterator t.incident_facets ( Vertex_handle v, OutputIterator facets)
Copies the Facets incident to v to the output iterator facets. Returns the resulting output iterator.
Precondition: t.dimension() =3, v Vertex_handle(), t.is_vertex(v).
template <class OutputIterator>
OutputIterator t.incident_vertices ( Vertex_handle v, OutputIterator vertices)
Copies the Vertex_handles of all vertices incident to v to the output iterator vertices. If t.dimension() <2, then do nothing. Returns the resulting output iterator.
Precondition: v Vertex_handle(), t.is_vertex(v).
it seems that t.incident_edges is missing, (and is not what you want)
a better workarround than yours is to take incident cells and take all 6 edges
of these cells. In that way
- an edge from v is obtained several time (6 on average)
- an edge not containing v is obtained twice (probably with both orientations if you do it carefully).
removing duplicates is then needed.....
- [cgal-discuss] How to explore all edges of all cells incident to a vertex, aganj, 10/15/2008
- Re: [cgal-discuss] How to explore all edges of all cells incident, Olivier Devillers, 10/15/2008
- Re: [cgal-discuss] How to explore all edges of all cells incident, Monique Teillaud, 10/15/2008
- Re: Re: [cgal-discuss] How to explore all edges of all cells, aganj, 10/15/2008
- Re: [cgal-discuss] How to explore all edges of all cells incident, Monique Teillaud, 10/15/2008
- Re: [cgal-discuss] How to explore all edges of all cells incident, Olivier Devillers, 10/15/2008
Archive powered by MHonArc 2.6.16.