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

@@ -17,12 +17,15 @@ impl Mesh {
pub fn new(
collider: ColliderHandle,
vertices: Vec<Point<f32>>,
indices: Vec<Point3<u32>>,
indices: Vec<[u32; 3]>,
color: Point3<f32>,
window: &mut window::Window,
) -> Mesh {
let vs = vertices;
let is = indices.into_iter().map(na::convert).collect();
let is = indices
.into_iter()
.map(|idx| Point3::new(idx[0] as u16, idx[1] as u16, idx[2] as u16))
.collect();
let mesh;
let gfx;