Subject: CGAL users discussion list
List archive
- From: eduriol <>
- To:
- Subject: [cgal-discuss] Accesing vertices in Apollonius_graph_2
- Date: Sat, 12 Dec 2009 15:23:09 -0800 (PST)
How can I access the position on the plane of the vertices from a given
Apollonius graph?
I'm a beginner with CGAL, I've been searching a lot in documentation but
haven't find what I need. I append some code as example:
---------------------------------------------------------------------------
/* Typedefs */
typedef CGAL::Cartesian<double> K;
typedef CGAL::Point_2<K> Point_2;
typedef CGAL::Apollonius_graph_filtered_traits_2<K> Gt;
typedef CGAL::Apollonius_graph_vertex_base_2<Gt> Vb;
typedef CGAL::Triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Agds;
typedef CGAL::Apollonius_graph_2<Gt,Agds> Apollonius_graph;
typedef Gt::Site_2 Site_2;
typedef Gt::Site_2::Weight Weight;
/* Sites' position vector declaration */
std::vector<Point_2> points;
-- Code to fill points in here...
/* Point of vertices declaration */
std::vector<Point_2> ap_vertices;
/* Graph declaration */
Apollonius_graph ap;
/* Graph filling */
for (int i=0; i<points.size(); i++) {
ap.insert(Site_2(points[i], Weight(10*i)));
}
Now, how can I access to the vertices (not the sites) of 'ap' to fill
'ap_vertices' with them?
Many thanks.
--
View this message in context:
http://n4.nabble.com/Accesing-vertices-in-Apollonius-graph-2-tp962748p962748.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Accesing vertices in Apollonius_graph_2, eduriol, 12/13/2009
- Re: [cgal-discuss] Accesing vertices in Apollonius_graph_2, eduriol, 12/15/2009
Archive powered by MHonArc 2.6.16.