modelio-rs 0.2.1

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
13
use modelio::prelude::*;

fn main() -> modelio::Result<()> {
    let camera = Camera::new()?;
    camera.set_projection(CameraProjection::Perspective);
    camera.set_field_of_view(45.0);
    camera.look_at_from([0.0, 0.0, -1.0], [0.0, 0.0, 3.0]);

    println!("camera_info={:?}", camera.info()?);
    println!("camera_ray={:?}", camera.ray_to([10, 10], [20, 20]));
    println!("✅ modelio camera OK");
    Ok(())
}