Inline redundant variable

This commit is contained in:
Hanno Braun 2024-10-30 01:29:42 +01:00
parent d344880c75
commit 552bdc4c96

View File

@ -1,21 +1,6 @@
use crate::mesh::Mesh;
pub fn model() -> anyhow::Result<Mesh> {
let triangles = vec![
[0, 4, 6], // left
[0, 6, 2],
[1, 3, 7], // right
[1, 7, 5],
[0, 1, 5], // front
[0, 5, 4],
[2, 7, 3], // back
[2, 6, 7],
[0, 2, 1], // bottom
[1, 2, 3],
[4, 5, 7], // top
[4, 7, 6],
];
Ok(Mesh {
vertices: vec![
[-0.5, -0.5, -0.5], // 0
@ -27,6 +12,19 @@ pub fn model() -> anyhow::Result<Mesh> {
[-0.5, 0.5, 0.5], // 6
[0.5, 0.5, 0.5], // 7
],
triangles,
triangles: vec![
[0, 4, 6], // left
[0, 6, 2],
[1, 3, 7], // right
[1, 7, 5],
[0, 1, 5], // front
[0, 5, 4],
[2, 7, 3], // back
[2, 6, 7],
[0, 2, 1], // bottom
[1, 2, 3],
[4, 5, 7], // top
[4, 7, 6],
],
})
}