Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] 3D Triangulation with extra info

Subject: CGAL users discussion list

List archive

[cgal-discuss] 3D Triangulation with extra info


Chronological Thread 
  • From: Joao Dinis <>
  • To: CGAL discussion list <>
  • Subject: [cgal-discuss] 3D Triangulation with extra info
  • Date: Mon, 28 Nov 2011 15:11:48 +0000


hi,

I'm computing a 3D Triangulation, adding an unsigned integer to each
vertex (that integer identifies each vertex at another structure).

Computing it with a Delaunay triangulation I'm able to do it with:

-------------------------------------------------------------------------------

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation;
typedef Triangulation::Point
Point;

typedef std::pair<Point,unsigned> point_x;

/* and later computing it with: */

std::vector<point_x> points;

/* fill points array with std::make_pair(...), and */

T.insert(points.begin(), points.end());


-------------------------------------------------------------------------------

but with the simple 3D triangulation, the above scheme does not work.
That is: just exchanging

typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation;

with
typedef CGAL::Triangulation_3<K, Tds> Triangulation;


All I get is a lot of compile errors, linked to the
T.insert(points.begin(), points.end());
line.

The work-around I found (here at cgal-discuss) is to mimic the
T.insert(), assigning the extra info (the unsigned integer) after
creating each vertex.

-----

My question is: is there any way to create a simple 3D triangulation
with extra info like in the Delaunay example?

Thanks,

Joao Dinis

















Archive powered by MHonArc 2.6.16.

Top of Page