This change cleans up the existing but disabled code for edge tag shortest path, fixing a couple of bugs in the disabled code:
- A crashing bug due to a loop index variable not getting reset to 0 before running a loop
- An algorithm bug that was incorrectly determining the vertices to calculate distances (see old code determining eed1 and eed2 in edgetag_cut_cost)
- A heuristic bug that could result in negative costs in some corner cases (use sqrtf of the dot product to calculate a bias, not the dot product itself)
Note that the algoirthm does NOT always select the shortest path, due to the bias to avoid turns. It uses a bias to favor a longer path with only a few turns over a shorter path that zig-zags across the mesh. The old code had a bug in the bias, mentioned above. That bug could actually result in sections of the path contributing very large negative values to the cost (resulting in some blatantly bad paths in certain cases).
Description
Description