Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] about the function incident_vertices() and output
- Date: Thu, 22 Jan 2009 15:43:45 +0100
Hello,
In your code I don't see how vertices make it into
the vector. If you just create a vector with 800 Vertex_handles
you have just 800 pointers to NULL.
You refer to a function incident_vertices, but you don't
show us how you use it
andreas
Kwok Jasper wrote:
> 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)<
> br>> > {
> > > //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部屋?! <http://buddy.hk.msn.com/>
- RE: [cgal-discuss], (continued)
- RE: [cgal-discuss], Kwok Jasper, 01/21/2009
- Re: [cgal-discuss], Camille Wormser, 01/21/2009
- RE: [cgal-discuss], Kwok Jasper, 01/21/2009
- Re: [cgal-discuss], Camille Wormser, 01/21/2009
- Re: [cgal-discuss], Camille Wormser, 01/20/2009
- [cgal-discuss], soufiane.khiat, 01/20/2009
- Re: [cgal-discuss], Andreas Fabri, 01/21/2009
- Re: [cgal-discuss], skhiat, 01/22/2009
- Re: [cgal-discuss], Andreas Fabri, 01/21/2009
- [cgal-discuss], Kwok Jasper, 01/22/2009
- Re: [cgal-discuss], Andreas Fabri, 01/22/2009
- [cgal-discuss] about the function incident_vertices() and output iterator, Kwok Jasper, 01/22/2009
- Re: [cgal-discuss] about the function incident_vertices() and output, Andreas Fabri, 01/22/2009
- RE: [cgal-discuss] about the function incident_vertices() and output, Kwok Jasper, 01/22/2009
- Re: [cgal-discuss] about the function incident_vertices() and output, Laurent Rineau (GeometryFactory), 01/22/2009
- RE: [cgal-discuss] about the function incident_vertices() and output, Kwok Jasper, 01/22/2009
- Re: [cgal-discuss] about the function incident_vertices() and output iterator, Laurent Rineau (GeometryFactory), 01/22/2009
- RE: [cgal-discuss] about the function incident_vertices() and, Kwok Jasper, 01/22/2009
- Re: [cgal-discuss] about the function incident_vertices() and output, Andreas Fabri, 01/22/2009
- [cgal-discuss] about the function incident_vertices() and output iterator, Kwok Jasper, 01/22/2009
- Re: [cgal-discuss], Andreas Fabri, 01/22/2009
- RE: [cgal-discuss], Kwok Jasper, 01/21/2009
Archive powered by MHonArc 2.6.16.