mirror of
https://github.com/IllusionMan1212/3dobs.git
synced 2026-10-24 10:12:35 +00:00
WIP: obj loader mostly done
This commit is contained in:
@@ -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:
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user