assimp

github.com/coballast/assimp

DESCRIPTION:

This is a ruby gem containing a language binding of the ASSIMP library.

FEATURES/PROBLEMS:

This library is a wrapper around the ASSIMP library. It takes the entire aiScene structure imported
from a file and converts it to one massive hash for consumption by web software.

Currently only importing is supported. I plan to add exporting in the future (although I won't complain
if someone does it for me and makes a pull request). The only class is Importer. I plan in future releases
to add full fledged ruby class wrappers for relevent things like aiMesh or aiNode.

I have neglected some file formats that have experimental support, such as COB. Look at the file_extensions variable
in /test/test_importer.rb for a complete list of file formats that I have rigourously tested for.

Currently, this gem only supports a subset of the post processing flags available in assimp. Take a look at ext/assimp/assimp_importer.c
for the list of flags available to you. If there is some flag you need that don't have access to, it may only involve 3 or 4 lines of C to add it.
Some flags require you to expose extra configuration settings of assimp to ruby. In that case, may the force be with you.

SYNOPSIS:

require 'assimp'

importer = ASSIMP::Importer.new

scene = importer.read_file("example_file.3ds", 
  [:triangulate, :make_left_handed, :calc_tangent_space]);

pp scene 

# out prints nicely formated data like meshes, 
# animations, and materials for consumption by say, a webgl front end renderer.

REQUIREMENTS:

This gem depends on the native assimp library. You can get the source from http://assimp.sourceforge.net/main_downloads.html 
and compile and install it that way. Debian based systems provide a package in aptitude.

I am required to point out that my software uses assimp under the BSD license, and that it's not my copyright. If you really care,
you can find their terms at http://assimp.sourceforge.net/main_license.html

INSTALL:

gem install assimp

DEVELOPERS:

After checking out the source, run bundle in the directory. You do have bundle right? Make sure you have the native ASSIMP library installed in one of the standard UNIX library directories. After that, running rake on the project should compile everything and run the tests.

If you have trouble, constructive criticism and/or suggestions for the project, please send me an e-mail! It’s public profile information. I am eager to to help, contribute, and improve as a programmer.

LICENSE:

(The MIT License)

Copyright © 2014 Colin Ballast

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.