Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] A Triangulations problem
- Date: Wed, 03 Mar 2010 14:57:56 +0100
zhoufang8811 wrote:
> Hi,
>
> Now I am using the Triangulations Algorithom,I have a problem that how
> can I get the sequence number of the vertices after inserted ?
>
> I use this method but it is inefficiency :
>
> Triangulation tr;
>
> size_type get_vertex_no(Vertex_handle vh) {
>
> Vertex_iterator vit = tr.vertices_begin();
> size_type no = 0;
> for (; vit != tr.vertices_end() ; ++vit) {
>
> if (vh == vit)
> break;
> no ++;
>
> }
> return no;
>
> }
>
> 2010-03-03
> ------------------------------------------------------------------------
> zhoufang8811
You can associate an index to each vertex of your triangulation.
Please have a look at this example:
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Subsection_35.6.2
S.
- [cgal-discuss] A Triangulations problem, zhoufang8811, 03/03/2010
- Re: [cgal-discuss] A Triangulations problem, Sebastien Loriot (GeometryFactory), 03/03/2010
Archive powered by MHonArc 2.6.16.