Subject: CGAL users discussion list
List archive
- From: Markus Eich <>
- To:
- Subject: [cgal-discuss] Newbie question on Triangulation HIerarchie
- Date: Mon, 31 Aug 2009 11:07:12 +0200
Hi all,
I want to generate a 3D Delaunay Triangulation with CGAl and
triangulation hierarchiy_3
the first step to play around with it was to generate a tetraeder with 4
points.
====================defines
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_3<K> Vb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vb> Vbh;
typedef CGAL::Triangulation_data_structure_3<Vbh> Tds;
typedef CGAL::Delaunay_triangulation_3<K,Tds> Dt;
typedef CGAL::Triangulation_hierarchy_3<Dt> Dh;
typedef Dh::Finite_vertices_iterator
Finite_vertices_iterator;
typedef Dh::Finite_edges_iterator
Finite_edges_iterator;
typedef Dh::Finite_facets_iterator
Finite_facets_iterator;
===================in my function
Dh T;
T.insert(Point(-5,0,0));
T.insert(Point(10,0,0));
T.insert(Point(0,10,0));
T.insert(Point(5,5,10));
cout<<"found "<<T.number_of_vertices()<<" vertices"<<endl;
cout<<"found "<<T.number_of_edges()<<" edges"<<endl;
cout<<"found "<<T.number_of_cells()<<" cells"<<endl;
=====================
The strange thing is: my output is
found 4 vertices
found 10 edges
found 5 cells
???????
I expected for this tetraeder the output of 6 edges and 1 cell because
its ONE! tetraeder. Or do i get some concepts completely wrong?
My second question is:
I want to display the generated triangles of the tetraeder with OpenGL,
how can i run through the triangles of the triangulation and access the
vertices?
Thank you
/Markus
--
Dipl. Inf. Markus Eich
Researcher
Bereich Logistik
DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 218-64100
Fax: +49 (0)421 218-64150
E-Mail:
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
- [cgal-discuss] Newbie question on Triangulation HIerarchie, Markus Eich, 08/31/2009
- Re: [cgal-discuss] Newbie question on Triangulation HIerarchie, Olivier Devillers, 08/31/2009
- Re: [cgal-discuss] Newbie question on Triangulation HIerarchie, Samuel Hornus, 08/31/2009
Archive powered by MHonArc 2.6.16.