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 ply {
    use modelz::Model3D;

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

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