A simple reference implemenation rendering Wavefront OBJ format 3D models. More...
|static smart_ptr< Model >||obj::Model::create (nstream::Stream *stream, float scale)|
|loads an OBJ scene object (aiScene) which can render itself |
|typedef std::map< std::string, |
smart_ptr< glut::Material > >
|map_mtl_t||obj::parseOBJMaterials (nstream::Stream *stream)|
|given a stream for an OBJ material file, returns a map of name --> material |
A simple reference implemenation rendering Wavefront OBJ format 3D models.
The Open Asset Library implementation also supports OBJ, but there are a few issues there:
OBJ is simple enough so this is a quick reference implementation.
A note to users of this model: in the interest of rendering performance, vertex data is copied per vertex. That is, it is not indexed per vertex, but instead the vertex data (including normals etc) is copied.
So if you have a large model with a lot of shared vertices, this approach could be too memory intensive.
|map_mtl_t obj::parseOBJMaterials||(||nstream::Stream *||stream||)|
given a stream for an OBJ material file, returns a map of name --> material