Subject: CGAL users discussion list
List archive
- From: <>
- To:
- Subject: [cgal-discuss] Building/Visualizing Triangulation data structure
- Date: Fri, 16 Apr 2010 10:43:07 +0200 (CEST)
Hi,
I want to know if there's any possibility to visualize (or export to OFF
file)
an object based triangulation data structure. Actuallly, my definitions are:
struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef CGAL::Triangulation_vertex_base_2<K> Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
typedef CGAL::Triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_2<K,Tds> Dt;
typedef CGAL::Triangulation_hierarchy_2<Dt> Triangulation;
typedef Triangulation::Vertex_handle Vertex_handle;
typedef Triangulation::Face_handle Face_handle;
My purpose is to build and then visualize a triangulation by defining each
vertex and each triangle seperately, something like this (considering the
previous definitions):
Triangulation T;
Vertex_handle v1 = T.insert(Point (0,0));
Vertex_handle v2 = T.insert(Point (1,0));
Vertex_handle v3 = T.insert(Point (0,1));
Face_handle f2 = T.create_face(v1, v2, v3);
But I dont' know if it is possible to viusalize that (or export the generated
triangulation) ?
I tried the following (using CGAL/Qt/TriangulationGraphicsItem.h):
CGAL::Qt::TriangulationGraphicsItem<Triangulation> * m_p_tr
m_p_dgi = new CGAL::Qt::TriangulationGraphicsItem<Triangulation>(& T);
But it doesn't work.
Any suggestion is helpful
Best regards,
Youssef ALJ
- [cgal-discuss] Building/Visualizing Triangulation data structure, youssef_alj, 04/16/2010
Archive powered by MHonArc 2.6.16.