modelio-rs 0.2.4

Safe Rust bindings for Apple's ModelIO framework — assets, meshes, materials, lights, cameras, voxels, textures, and animation on macOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use modelio::prelude::*;

#[test]
fn mesh_primitives_have_geometry_and_descriptors() {
    let mesh = Mesh::new_box([1.0, 1.0, 1.0], [1, 1, 1], false, GeometryType::Triangles)
        .expect("box mesh");

    assert!(mesh.vertex_count() > 0);
    assert!(mesh.submesh_count() > 0);
    assert!(mesh.vertex_descriptor().is_some());
    assert!(!mesh.vertex_buffers().is_empty());
}