Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Getting triangle indices from Delaunay 3D

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Getting triangle indices from Delaunay 3D


Chronological Thread 
  • From: Thomas Morzadec <>
  • To:
  • Subject: Re: [cgal-discuss] Getting triangle indices from Delaunay 3D
  • Date: Mon, 22 Jan 2018 16:36:07 +0100 (CET)

Hello,

I am Thomas Morzadec. I would like to unsubscribe from the mailing list.

I didn't manage to do it via the website,

How could I do?

best,

T. Morzadec

----- Mail original -----
> De: "ahmedtolba"
> <>
> À:
>
> Envoyé: Lundi 22 Janvier 2018 15:52:20
> Objet: [cgal-discuss] Getting triangle indices from Delaunay 3D
>
> Hi,
> I'm trying to draw a 3D mesh using cgal using directx
> In DirectX I need three indices of the 3D Mesh.
>
> I'm doing the following, but I get broken triangles
>
> std::vector<unsigned int> triangles;
> std::map<Delaunay3::Vertex_handle, int> Vertices;
> int index = 1;
>
> for (Delaunay3::Finite_vertices_iterator vit =
> dt.finite_vertices_begin(), end = dt.finite_vertices_end(); vit != end;
> ++vit)
> {
> Vertices[vit] = index;
> index++;
> }
>
> for (Delaunay3::Finite_cells_iterator cit = dt.finite_cells_begin(),
> end = dt.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;
> triangles.push_back(V1ind);
> triangles.push_back(V2ind);
> triangles.push_back(V3ind);
> }
>
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
>



Archive powered by MHonArc 2.6.18.

Top of Page