Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: ahmedtolba <>
  • To:
  • Subject: [cgal-discuss] Getting triangle indices from Delaunay 3D
  • Date: Mon, 22 Jan 2018 07:52:20 -0700 (MST)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:QxcqLBF5cRaFSjs9Uu4N0Z1GYnF86YWxBRYc798ds5kLTJ78osiwAkXT6L1XgUPTWs2DsrQY07OQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmCexbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOTA5/m/JicJ+ka1Urw6uqRFk347ZYp2ZOOZicq/BY98XQ3dKUMZLVyxGB4Oxd5EAD+oEPelGsob9u1wOrR+lCga2GejizTBJhnDs0q0/zeshCRvG3AsvH9IUqnvUqdD1O7kIUe2uzKnIyinDb/ZM1jf87IjEaAwuofaJXb9pd8fa1EchFwTAjlqKqIzlOSuY1uIXvGeA9OVgUfygh3Q7pAF2pziiwNonhIrRho8N11zJ9Dt1zJwrKdC4RkN3e8OoHZVeui2ANYZ6XMUvSHxytikg0L0Jo5u7cTAKyJs5wx7fbOSKc46H7x75UuaeOyx3i2lheL2hnRq97U+gyujkWsm11lZFsDZFn8HRun0MyRDf8NaLR/tz80u7xDqC2Q7e5vtGLEwqjabbLoQuwr80lpodq0TDGSr2lV35ja+ZbEok//an6/z9YrXhqZ+cLZV7igT7MqswgMyyGuQ4Mg8SX2ie4+u81bnj8VflT7VNi/06irPZv4zCJcQHuq65BBdY3Zos6xmlCzeqyckXnXgcLF1ZZRKHlJPpNkrVIPH4CPe/m06jnC1qx/DAJL3hA4/CImLNkLf7Lv5B7BtXxwM3iNxe/JlJEaopIfTpW0a3usaLIAU+Nlm9w+PqBMl60okXETafDaacPbvItlCS7+cqLvOkZIgJvT/8L74u4Pu43ixxokMUYaT8hchfU3u/BPkzexzIM0qpuc8IFCIxhiR7SeXrjFOYVjsKPCSyWL457zA/TomhCNWYH9z/sPm6xC6+W6ZuSCVeEFnVSiXocJmBUvYILimVJ505y2FWZf2aU4YkkCqWmkr6xr5gd7eG/HFes5vp3tx4oebUkENr+A==

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/



Archive powered by MHonArc 2.6.18.

Top of Page