Switch to [u32; DIM] instead of Point<u32> for element indices.

This commit is contained in:
Crozet Sébastien
2021-01-20 15:40:00 +01:00
parent e2006599a8
commit 28b7866aee
9 changed files with 46 additions and 42 deletions

View File

@@ -55,7 +55,10 @@ impl HeightField {
use std::rc::Rc;
let (vertices, indices) = heightfield.to_trimesh();
let indices = indices.into_iter().map(|i| na::convert(i)).collect();
let indices = indices
.into_iter()
.map(|idx| Point3::new(idx[0] as u16, idx[1] as u16, idx[2] as u16))
.collect();
let mesh = Mesh::new(vertices, indices, None, None, false);
let mut res = HeightField {