This commit is contained in:
DylanVsn 2020-03-10 14:08:25 +01:00
parent 5e4252da7e
commit 5f01e7fa5b
2 changed files with 919 additions and 363 deletions

1276
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -136,14 +136,16 @@ vector<EdgeHandle> meinDijkstra(MyMesh *_mesh, int v1, int v2) {
int current;
VertexHandle current_node;
uint distance;
VertexHandle following;
while (visited_nodes_id.size() != nb) {
current = minimal_new(dist_min, visited_nodes_id);
visited_nodes_id.insert(current);
if (current == v2) break;
current_node = _mesh->vertex_handle(current);
for (auto voh_it = _mesh->voh_iter(current_node); voh_it.is_valid(); ++voh_it) {
distance = dist_min[current] + _mesh->valence(*voh_it);
//following = *voh_it->outgoingvertex;
MyMesh::Halfedge cur_hf = _mesh->halfedge(*voh_it);
distance = dist_min[current] + _mesh->valence(cur_hf.edge);
following = cur_hf.outgoingvertex;
if (distance < dist_min[following]) {
dist_min[successeur] = distance;
prec_hv_id[successeur] = *voh_it->idx;