Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: euclidean distance field acceleration #11

Merged
merged 9 commits into from
Jul 20, 2020
Prev Previous commit
Next Next commit
feat: 3d seems to be working now too
  • Loading branch information
william-silversmith committed Jul 14, 2020
commit 3ab2496669cf136ed1bb201280af6e5148d56d7d
2 changes: 1 addition & 1 deletion dijkstra3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ float* euclidean_distance_field3d_free_space(
float dyz = std::min(dy, dz);
float dxz = std::min(dx, dz);

dist[loc] = dx + dy + dz + dxyz * (sqrt(3.0) - 3.0) + (dxy + dyz + dxz) * (sqrt(2.0) - 2.0);
dist[loc] = dx + dy + dz + dxyz * (sqrt(3.0) - 3.0) + (dxy + dyz + dxz - 3 * dxyz) * (sqrt(2.0) - 2.0);
}
}
}
Expand Down