(&mut self, vertex_count: usize, tri_capacity: usize)
| 356 | } |
| 357 | if lods.is_empty() { |
| 358 | lods.push(LodSet { |
| 359 | indices: indices.to_vec(), |
| 360 | surface_ranges: base_surfaces, |
| 361 | }); |
| 362 | } |
| 363 | Ok(lods) |
| 364 | } |
| 365 | |
| 366 | fn build_surface_lods( |
| 367 | vertices: &[LodVertex], |
| 368 | surface_indices: &[u32], |
| 369 | ratios: &[f32], |
| 370 | ) -> Vec<Vec<u32>> { |
| 371 | let Some((&min_index, &max_index)) = surface_indices |
| 372 | .iter() |
| 373 | .min() |
| 374 | .zip(surface_indices.iter().max()) |
| 375 | else { |
| 376 | return ratios.iter().map(|_| Vec::new()).collect(); |
| 377 | }; |
| 378 | let min_vertex = min_index as usize; |
no test coverage detected