Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] about the function incident_vertices() and output iterator

Subject: CGAL users discussion list

List archive

[cgal-discuss] about the function incident_vertices() and output iterator


Chronological Thread 
  • From: Kwok Jasper <>
  • To: <>
  • Subject: [cgal-discuss] about the function incident_vertices() and output iterator
  • Date: Thu, 22 Jan 2009 22:30:21 +0800
  • Importance: Normal

Thank you very much

and for the following for calling the incident_vertices function

> > typedef CGAL::Exact_predicates_inexact_constructions_kernel K1;
> > typedef CGAL::Delaunay_triangulation_3<K1> Triangulation;
> > typedef Triangulation::Point Point_tr;
> >
> > Triangulation Tr;
> >
> > Vertex_handle v = Tr.insert(Point_tr(0,0,0));
> > Tr.insert(Point_tr(40,20,10));
> > //...insert some more points
> >
> > vector<Vertex_handle> con;
> > con.resize(800);
> >
> > vector <Vertex_handle>::iterator start_inci = con.begin();
> > vector<Vertex_handle>::iterator end_inci = con.end();
> > vector<Vertex_handle>::iterator curr_inci;
> >
> > for(curr_inci = start_inci; curr_inci != end_inci; ++curr_inci)
> > {
> > //do sth with the vertex handles.
> > }


may I ask if it is a proper way to use it.
In the method , I use  con.resize(800);
If I didn't use the resize() function there.
then it have a exception telling that the iterator cannot be deferenced
May I ask if the above code is a proper way to use the incident_vertices() function ?

Thank you



> Date: Thu, 22 Jan 2009 15:23:24 +0100
> From:
> To:
> Subject: Re: [cgal-discuss]
>
> Kwok Jasper wrote:
> > Excuse me, may I ask something?
> >
> > I have tried the code below
> > and I am not sure if I have used the function incident_vertices correctly.
> > May I ask if anyone is willing to tell me whether I have used that
> > function properly?
> >
> >
> > typedef CGAL::Exact_predicates_inexact_constructions_kernel K1;
> > typedef CGAL::Delaunay_triangulation_3<K1> Triangulation;
> > typedef Triangulation::Point Point_tr;
> >
> > Triangulation Tr;
> >
> > Vertex_handle v = Tr.insert(Point_tr(0,0,0));
> > Tr.insert(Point_tr(40,20,10));
> > //...insert some more points
> >
> > vector<Vertex_handle> con;
> > con.resize(800);
> >
> > vector <Vertex_handle>::iterator start_inci = con.begin();
> > vector<Vertex_handle>::iterator end_inci = con.end();
> > vector<Vertex_handle>::iterator curr_inci;
> >
> > for(curr_inci = start_inci; curr_inci != end_inci; ++curr_inci)
> > {
> > //do sth with the vertex handles.
> > }
> >
> >
> > And may I ask one more thing?
> > If there is a Vertex_handle v, then is it possible to get the x, y
> > coordinate of the vertex represented by v?
> > I have looked at the manual of 2D and 3D triangulation and cannot find
> > any examples about it.
> > May I ask if there is some method for doing that?
> >
> > Thank you very much for your attention.
>
> Once you have found the reference manual page for Vertex, things will
> become obvious.
>
> On this page
> http://www.cgal.org/Manual/3.4/doc_html/cgal_manual/Triangulation_2_ref/Class_Triangulation_2.html
>
> scroll down to the end, and click on
>
> TriangulationDataStructure_2::Face
> TriangulationDataStructure_2::Vertex
>
> to see what you can do with a vertex.
>
> andreas
>
>
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> > 利用 Windows Live™ Photos 輕?分享相片。 簡易上載及分享照片
> > <http://www.microsoft.com/windows/windowslive/events.aspx>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss


想同MSN Buddy傾計了解?多d? 參觀MSN Buddy部屋?!



Archive powered by MHonArc 2.6.16.

Top of Page