Crates.io | rust-assimp |
lib.rs | rust-assimp |
version | 0.0.23 |
source | src |
created_at | 2014-11-22 11:08:58.377827 |
updated_at | 2015-12-11 23:56:40.231265 |
description | A rust wrapper for assimp the open asset import library |
homepage | |
repository | https://github.com/jemcroft/rust-assimp |
max_upload_size | |
id | 334 |
size | 2,596,808 |
This code is currently unstable.
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);
}
}
}