(vertices: &[LodVertex], before: Option<[f32; 3]>, after: [u32; 3])
| 653 | edges.iter().filter_map(score_edge).collect::<Vec<_>>() |
| 654 | }; |
| 655 | out.sort_unstable_by(|a, b| { |
| 656 | a.cost |
| 657 | .total_cmp(&b.cost) |
| 658 | .then_with(|| a.keep.cmp(&b.keep)) |
| 659 | .then_with(|| a.remove.cmp(&b.remove)) |
| 660 | }); |
| 661 | out |
| 662 | } |
| 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])] { |
no test coverage detected