Giter Club home page Giter Club logo

russimp's Introduction

russimp russimp Crates.io

Rust bindings for Assimp (https://github.com/assimp/assimp)

Overview

Russimp is a library for talking to the assimp library which enables you to read 3d models in different formats to a common structure.

By default, russimp looks for the assimp library on your computer. To install it:

  • OSX: You will need to update brew and install assimp with it.
  • Linux: You will need to install assimp through your package manager of choice.
  • Windows: You can use the prebuilt version russimp = { version = "1.0.5", features = ["prebuilt"] }

Alternately, you may prefer to use prebuilt assimp binaries or compile it yourself; in either case russimp will statically link assimp into your binary. Russimp exposes the following Cargo features to manage the assimp dependency (this documentation is reproduced from russimp-sys):

prebuilt

Download prebuilt Assimp static library binaries from github and skip building from source.

Because Assimp build is slow and have build environment requirements. We provide prebuilt binaries for common platforms and features.

When a new version is released, github action automatically runs pre-build tasks, and all prebuilt binaries are saved in github releases.

The russimp-sys build script will try to download the prebuilt binaries from github first, and skip the full source build.

static-link

Enabling static-link feature without prebuilt feature will build assimp from source.

Builds from source need the following dependencies:

  • cmake
  • clang
  • Ninja for Linux and MacOS, Visual Studio 2019 for Windows

nozlib

By default russimp-sys will statically link zlibstatic, you can disable this feature if it conflicts with other dependencies.

Helping

You are very welcome to help with development, adding a feature, fixing a problem or just refactoring. Try to do it with tests =)

Make sure to run cargo fmt before creating a pull request.

How to use it?

Use Scene::from_file to load a scene from a given file or Scene::from_buffer to load the scene directly from memory. If you want, you can give PostProcess flags to change the scene structure according to your needs. From the scene, you will have access to the underlying structs.

let scene = Scene::from_file("myfile.blend",
vec![PostProcess::CalculateTangentSpace,
     PostProcess::Triangulate,
     PostProcess::JoinIdenticalVertices,
     PostProcess::SortByPrimitiveType]).unwrap();

// Progress The Scene...

Changelog

The Changelog can be found Here

russimp's People

Contributors

jkvargas avatar sutajo avatar waych avatar snowiiii avatar virtualritz avatar eliaperantoni avatar joeosborn avatar aregevdev avatar clouds56 avatar vpzomtrrfrt avatar fredriknoren avatar pema99 avatar encrypteddata avatar scottmcnab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.