Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation


Chronological Thread 
  • From: "adam.hopkins83" <>
  • To:
  • Subject: [cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation
  • Date: Mon, 31 Oct 2011 04:23:20 -0700 (PDT)

Hi

This is a 3D case, but you need to follow the same idea:

ITERATING THE VERTICES and creating a list with their indixes:

std::map<Vertex_handle, int> Vertices;
int index = 1;

for (Finite_vertices_iterator vit = T.finite_vertices_begin(), end =
T.finite_vertices_end(); vit != end; ++vit)
{
Vertices[vit] = index;
index++;
}

ITERATING THE CELLS:

std::map<Cell_handle, int> Cells;
std::map<Cell_handle, std::list&lt;int>> Cells_Test;
int index_aux = 0;

for(Finite_cells_iterator cit = T.finite_cells_begin(), end =
T.finite_cells_end(); cit != end; ++cit)
{
int V1ind = Vertices.find(cit->vertex(0))->second
int V2ind = Vertices.find(cit->vertex(1))->second
int V3ind = Vertices.find(cit->vertex(2))->second
int V4ind = Vertices.find(cit->vertex(3))->second
}

maybe is the same for 2D case
Best regard
Adam.

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Help-getting-triangles-coordinates-from-Delaunay-Triangulation-tp3955310p3955492.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page