Commit 384a4370 by Philipp Adolf

Fix bug in get_shared_edge

When we matched with a rotated triangle the name of the rotated triangle's edge was wrong.
parent 742aa15b
...@@ -51,13 +51,13 @@ bool Triangle::get_shared_edge(Triangle other, Edge &edge_a, Edge &edge_b) const ...@@ -51,13 +51,13 @@ bool Triangle::get_shared_edge(Triangle other, Edge &edge_a, Edge &edge_b) const
other.rotate_indices(); other.rotate_indices();
if (get_shared_edge_(other, edge_a, edge_b)) { if (get_shared_edge_(other, edge_a, edge_b)) {
edge_b.name = rotate_edge_name(rotate_edge_name(edge_b.name)); edge_b.name = rotate_edge_name(edge_b.name);
return true; return true;
} }
other.rotate_indices(); other.rotate_indices();
if (get_shared_edge_(other, edge_a, edge_b)) { if (get_shared_edge_(other, edge_a, edge_b)) {
edge_b.name = rotate_edge_name(edge_b.name); edge_b.name = rotate_edge_name(rotate_edge_name(edge_b.name));
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment