Magnum::Trade::ObjImporter class

OBJ importer plugin.

Loads Wavefront OBJ (*.obj) files, with the following supported features:

  • multiple objects
  • vertex positions, normals and 2D texture coordinates
  • triangles, lines and points

This plugin depends on the Trade library and is built if WITH_OBJIMPORTER is enabled when building Magnum. To use as a dynamic plugin, you need to load the "ObjImporter" plugin from MAGNUM_PLUGINS_IMPORTER_DIR. To use as a static plugin or as a dependency of another plugin with CMake, you need to request the ObjImporter component of the Magnum package and link to the Magnum::ObjImporter target. See Downloading and building, Usage with CMake and Loading and using plugins for more information.

Behavior and limitations

Polygons (quads etc.), automatic normal generation and material properties are currently not supported.

Base classes

class AbstractImporter
Base for importer plugins.

Constructors, destructors, conversion operators

ObjImporter() explicit
Default constructor.
ObjImporter(PluginManager::AbstractManager& manager, const std::string& plugin) explicit
Plugin manager constructor.