Crate tobj [] [src]

Tiny OBJ loader, inspired by Syoyo's excellent tinyobjloader

Structs

Material

A material that may be referenced by one or more meshes. Standard MTL attributes are supported and any unrecognized ones will be stored as Strings in the unknown_param HashMap

Mesh

A mesh for some model containing its triangle geometry This object could be a single polygon group or object within a file that defines multiple groups/objects or be the only mesh within the file if it only contains a single mesh

Model

A named model within the file This could be a group or object or the single model exported by the file

Enums

LoadError

TODO: Decide on various errors we'll return

Functions

load_mtl

Load the materials defined in a MTL file

load_obj

Load the various meshes in an OBJ file

print_model_info

Print out all loaded properties of some models and associated materials (once mats are added)

Type Definitions

LoadResult

LoadResult is a result containing all the models loaded from the file and any materials from referenced material libraries, or an error that occured while loading

MTLLoadResult

MTLLoadResult is a result containing all the materials loaded from the file and a map of MTL name to index or the error that occured while loading