WIP: obj loader mostly done

This commit is contained in:
2023-10-19 02:04:42 +02:00
parent 8b5143d6cb
commit 6c2c8665c3
9 changed files with 583 additions and 270 deletions
+27
View File
@@ -0,0 +1,27 @@
struct STLHeader {
header: [u8; 80],
num_triangles: u32,
}
struct Vertex {
x: f32,
y: f32,
z: f32,
}
struct Triangle {
normal: [f32; 3],
vertices: [Vertex; 3],
attribute_byte_count: u16,
}
struct STL {
header: STLHeader,
triangles: Vec<Triangle>,
}
impl STL {
pub fn new(stl: Vec<u8>) -> () {
// TODO:
}
}