(vertices: &[LodVertex], tri: [u32; 3])
| 663 | |
| 664 | fn build_topology(vertices: &[LodVertex], triangles: &[[u32; 3]], scratch: &mut SimplifyScratch) { |
| 665 | for (tri_index, tri) in triangles.iter().enumerate() { |
| 666 | for (a, b) in [(tri[0], tri[1]), (tri[1], tri[2]), (tri[2], tri[0])] { |
| 667 | let key = if a <= b { (a, b) } else { (b, a) }; |
| 668 | scratch |
| 669 | .edges |
| 670 | .entry(key) |
| 671 | .and_modify(|edge: &mut EdgeInfo| edge.count = edge.count.saturating_add(1)) |
| 672 | .or_insert(EdgeInfo { count: 1 }); |
| 673 | } |
no test coverage detected