All Projects → simnalamburt → obj-rs

simnalamburt / obj-rs

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
Wavefront obj parser for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to obj-rs

Alexandrie
An alternative crate registry, implemented in Rust.
Stars: ✭ 251 (+340.35%)
Mutual labels:  crates
magnet
A JSON/BSON schema generator
Stars: ✭ 16 (-71.93%)
Mutual labels:  crates
cargo-limit
Cargo with less noise: warnings are skipped until errors are fixed, Neovim integration, etc.
Stars: ✭ 105 (+84.21%)
Mutual labels:  crates
serde with
This crate provides custom de/serialization helpers to use in combination with serde's `with`-annotation and with the improved `serde_as`-annotation.
Stars: ✭ 392 (+587.72%)
Mutual labels:  crates
obj2usdz
🦖 obj2usdz, convert .OBJ files to .USDZ on iOS
Stars: ✭ 56 (-1.75%)
Mutual labels:  wavefront
cv
Rust CV mono-repo. Contains pure-Rust dependencies which attempt to encapsulate the capability of OpenCV, OpenMVG, and vSLAM frameworks in a cohesive set of APIs.
Stars: ✭ 426 (+647.37%)
Mutual labels:  crates
Staticvec
Implements a fixed-capacity stack-allocated Vec alternative backed by an array, using const generics.
Stars: ✭ 236 (+314.04%)
Mutual labels:  crates
crates
crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).
Stars: ✭ 156 (+173.68%)
Mutual labels:  crates
spring-petclinic-cloud
Fork of the Spring Cloud Microservices project packaged to be deployed on several Cloud platforms: Kubernetes and Cloud Foundry
Stars: ✭ 106 (+85.96%)
Mutual labels:  wavefront
naersk
Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly. [maintainer: @Patryk27]
Stars: ✭ 440 (+671.93%)
Mutual labels:  crates
wifiscanner
A crate to list WiFi hotspots in your area
Stars: ✭ 47 (-17.54%)
Mutual labels:  crates
colorful
Make your terminal output colorful.
Stars: ✭ 43 (-24.56%)
Mutual labels:  crates
leetcode-cli
May the code be with you 👻
Stars: ✭ 177 (+210.53%)
Mutual labels:  crates
cns
Search through rust crates without leaving the terminal
Stars: ✭ 23 (-59.65%)
Mutual labels:  crates
fitparse-rs
Rust library to parse FIT formatted files
Stars: ✭ 20 (-64.91%)
Mutual labels:  crates
Deps.rs
Keep your dependencies up-to-date
Stars: ✭ 240 (+321.05%)
Mutual labels:  crates
wavefront-proxy
Wavefront Proxy Project
Stars: ✭ 45 (-21.05%)
Mutual labels:  wavefront
version-compare
↔️ Rust library to easily compare version strings. Mirror from https://gitlab.com/timvisee/version-compare
Stars: ✭ 32 (-43.86%)
Mutual labels:  crates
go-metrics-wavefront
Wavefront plugin for go-metrics
Stars: ✭ 12 (-78.95%)
Mutual labels:  wavefront
mshwfs
Modal Shack-Hartmann wavefront sensor toolbox for MATLAB
Stars: ✭ 32 (-43.86%)
Mutual labels:  wavefront

obj-rs version

Wavefront .obj parser for Rust. It handles both .obj and .mtl formats. See Documentation for the further details.

[dependencies]
obj-rs = "0.6"
use std::fs::File;
use std::io::BufReader;
use obj::{load_obj, Obj};

let input = BufReader::new(File::open("tests/fixtures/dome.obj"))?;
let mobel: Obj = load_obj(input)?;

// Do whatever you want
model.vertices;
model.indices;

Rendered image of cute Rilakkuma


Glium support

obj-rs supports glium out of the box.

[dependencies]
glium = "0.26"
obj-rs = { version = "0.6", features = ["glium"] }
use std::fs::File;
use std::io::BufReader;
use obj::{load_obj, Obj};

let input = BufReader::new(File::open("rilakkuma.obj")?);
let obj: Obj = load_obj(input)?;

let vb = obj.vertex_buffer(&display)?;
let ib = obj.index_buffer(&display)?;

Please see the working sample for the further details. Use can execute it with the command below.

cargo run -p sampleapp


obj-rs is primarily distributed under the terms of both the Apache License (Version 2.0) and the MIT license. See COPYRIGHT for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].