modelz 0.1.5

A library to load various 3D file formats into a shared, in-memory representation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[cfg(test)]
mod stl {
    use modelz::Model3D;

    #[test]
    fn load_stl() {
        let model_path = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cube.stl");

        let model = Model3D::from_format(model_path, modelz::ModelFormat::STL)
            .expect("Failed to load stl model");
        for mesh in model.meshes {
            for vert in mesh.vertices {
                println!("{:?}", vert)
            }
        }
    }
}