Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: [cgal-discuss] Shortcuts
- Date: Fri, 22 Jan 2010 09:18:38 +0100
Hello,
I started to answer this mail and wanted to give links to follow
in order to find Edge, cw, Face, Vertex.
Agnel C J Kurian wrote:
How do I get x and y co-ordinates from a Finite_edges_iterator?
struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> TDS;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_triangulation_2<K, TDS, Itag> CT;
typedef CT::Point Point;
for (CT::Finite_edges_iterator eit = ct.finite_edges_begin();
eit != ct.finite_edges_end(); ++eit){
<b>// todo: list x and y co-ordinates here</b>
}
Hello,
It is in the manual, but how to get there with a minimum of links to follow.
When you are in the reference manual page of the Triangulation_2 (which is
base class of others)
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_2_ref/Class_Triangulation_2.html
you see in the section "Types"
"typedef Tds::Face Face; the face type. "
and in the section "Parameters"
"By default, the triangulation data structure is instantiated by
CGAL::Triangulation_data_structure_2 <
CGAL::Triangulation_vertex_base_2<Gt>,
CGAL::Triangulation_face_base_2<Gt> > >.
"
To know more about Face click on CGAL::Triangulation_face_base_2
In the section "Is Model for the Concepts"
you have to click on "TriangulationFaceBase_2"
and there you have to click on
"Refines
TriangulationDSFaceBase_2"
and we now know that in a face I can access a vertex.
Without making things completely redudant I suggest to add a shortcut from
the
very first typedef to the very last page, because to explain this path of
links
is correct and minimalistic (Occam's razor), but not user friendly.
andreas
- [cgal-discuss] Vertices from a Finite_edges_iterator (Triangulation_2), Agnel C J Kurian, 01/22/2010
- Re: [cgal-discuss] Vertices from a Finite_edges_iterator (Triangulation_2), Sebastien Loriot (GeometryFactory), 01/22/2010
- [cgal-discuss] Shortcuts, Andreas Fabri, 01/22/2010
- Re: [cgal-discuss] Vertices from a Finite_edges_iterator (Triangulation_2), Sebastien Loriot (GeometryFactory), 01/22/2010
Archive powered by MHonArc 2.6.16.