Skip to content

Rust bindings for Assimp: The Open Asset Import library

License

Notifications You must be signed in to change notification settings

jarod/rust-assimp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-assimp Build Status

Documentation

Notice

This code is currently unstable.

Building

Examles

Simple import example

This example sets up logging, loads a model and prints all its vertices to stdout.

extern crate assimp;

use assimp as ai;

fn main() {
    // Log to stdout and a file `log.txt`
    ai::log::add_log_stream(ai::log::Stdout);
    ai::log::add_log_stream(ai::log::File("log.txt"));
    ai::log::enable_verbose_logging(true);

    let importer = ai::Importer::new();

    // The file to import
    let scene = importer.import("examples/assets/cube.dae").unwrap();

    // Print all the vertices in all the meshes
    for mesh in scene.get_meshes().iter() {
        for vert in mesh.get_vertices().iter() {
            println!("{}", vert);
        }
    }
}

About

Rust bindings for Assimp: The Open Asset Import library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages