Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] 3D Triangulation with extra info
  • Date: Mon, 28 Nov 2011 16:24:14 +0100

The insert of range of points and info was added only to Delaunay and
Regular triangulations in order to benefit from the spatial sorting
and adding information at the same time.
We did not think it would be useful too for Triangulation_3 as the
"work-around" you use is equivalent in term of performance.

Sebastien.

Joao Dinis wrote:
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