This is a snapshot of a work-in-progress documentation theme. If you feel lost, miss something, or want to see the original Doxygen docs instead, head over to the archived version of this documentation page.

Magnum::Trade::AbstractImporter class

Base for importer plugins.

Provides interface for importing 2D/3D scene, mesh, material, texture and image data. See Loading and using plugins for more information and *Importer classes in Trade namespace for available importer plugins.

Subclassing

The plugin needs to implement the doFeatures(), doIsOpened() functions, one of or both doOpenData() and doOpenFile() functions, function doClose() and one or more tuples of data access functions, based on which features are supported in given format.

For multi-data formats the file opening shouldn't take long and all parsing should be done in the data parsing functions instead, because the user might want to import only some data. This is obviously not the case for single-data formats like images, as the file contains all the data the user wants to import.

You don't need to do most of the redundant sanity checks, these things are checked by the implementation:

  • The doOpenData() and doOpenFile() functions are called after the previous file was closed, function doClose() is called only if there is any file opened.
  • The doOpenData() function is called only if Feature::OpenData is supported.
  • All do*() implementations working on an opened file are called only if there is any file opened.
  • All do*() implementations taking data ID as parameter are called only if the ID is from valid range.

Plugin interface string is "cz.mosra.magnum.Trade.AbstractImporter/0.3".

Derived classes

class AnyImageImporter
Any image importer plugin.
class AnySceneImporter
Any scene importer plugin.
class AssimpImporter
Assimp importer.
class ColladaImporter
Collada importer plugin.
class DdsImporter
DDS image importer plugin.
class DevIlImageImporter
DevIL Image importer plugin.
class JpegImporter
JPEG importer plugin.
class ObjImporter
OBJ importer plugin.
class OpenGexImporter
OpenGEX importer.
class PngImporter
PNG importer plugin.
class StanfordImporter
Stanford PLY importer plugin.
class StbImageImporter
Image importer plugin using stb_image.
class TgaImporter
TGA importer plugin.

Public types

enum class Feature: UnsignedByte { OpenData = 1 << 0 }
Features supported by this importer.
using Features = Containers::EnumSet<Feature>
Set of features supported by this importer.

Constructors, destructors, conversion operators

AbstractImporter() explicit
Default constructor.
AbstractImporter(PluginManager::Manager<AbstractImporter>& manager) explicit
Constructor with access to plugin manager.
AbstractImporter(PluginManager::AbstractManager& manager, const std::string& plugin) explicit
Plugin manager constructor.

Public functions

auto features() const -> Features
Features supported by this importer.
auto isOpened() const -> bool
Whether any file is opened.
auto openData(Containers::ArrayView<const char> data) -> bool
Open raw data.
auto openFile(const std::string& filename) -> bool
Open file.
void close()
Close file.
auto importerState() const -> const void*
Plugin-specific access to internal importer state.

Protected functions

void doOpenFile(const std::string& filename) virtual
Implementation for openFile()
auto doFeatures() const -> Features pure virtual
Implementation for features()
auto doIsOpened() const -> bool pure virtual
Implementation for isOpened()
void doOpenData(Containers::ArrayView<const char> data) virtual
Implementation for openData()
void doClose() pure virtual
Implementation for close()
auto doDefaultScene() -> Int virtual
Implementation for defaultScene()
auto doSceneCount() const -> UnsignedInt virtual
Implementation for sceneCount()
auto doSceneForName(const std::string& name) -> Int virtual
Implementation for sceneForName()
auto doSceneName(UnsignedInt id) -> std::string virtual
Implementation for sceneName()
auto doScene(UnsignedInt id) -> Containers::Optional<SceneData> virtual
Implementation for scene()
auto doLightCount() const -> UnsignedInt virtual
Implementation for lightCount()
auto doLightForName(const std::string& name) -> Int virtual
Implementation for lightForName()
auto doLightName(UnsignedInt id) -> std::string virtual
Implementation for lightName()
auto doLight(UnsignedInt id) -> Containers::Optional<LightData> virtual
Implementation for light()
auto doCameraCount() const -> UnsignedInt virtual
Implementation for cameraCount()
auto doCameraForName(const std::string& name) -> Int virtual
Implementation for cameraForName()
auto doCameraName(UnsignedInt id) -> std::string virtual
Implementation for cameraName()
auto doCamera(UnsignedInt id) -> Containers::Optional<CameraData> virtual
Implementation for camera()
auto doObject2DCount() const -> UnsignedInt virtual
Implementation for object2DCount()
auto doObject2DForName(const std::string& name) -> Int virtual
Implementation for object2DForName()
auto doObject2DName(UnsignedInt id) -> std::string virtual
Implementation for object2DName()
auto doObject2D(UnsignedInt id) -> std::unique_ptr<ObjectData2D> virtual
Implementation for object2D()
auto doObject3DCount() const -> UnsignedInt virtual
Implementation for object3DCount()
auto doObject3DForName(const std::string& name) -> Int virtual
Implementation for object3DForName()
auto doObject3DName(UnsignedInt id) -> std::string virtual
Implementation for object3DName()
auto doObject3D(UnsignedInt id) -> std::unique_ptr<ObjectData3D> virtual
Implementation for object3D()
auto doMesh2DCount() const -> UnsignedInt virtual
Implementation for mesh2DCount()
auto doMesh2DForName(const std::string& name) -> Int virtual
Implementation for mesh2DForName()
auto doMesh2DName(UnsignedInt id) -> std::string virtual
Implementation for mesh2DName()
auto doMesh2D(UnsignedInt id) -> Containers::Optional<MeshData2D> virtual
Implementation for mesh2D()
auto doMesh3DCount() const -> UnsignedInt virtual
Implementation for mesh3DCount()
auto doMesh3DForName(const std::string& name) -> Int virtual
Implementation for mesh3DForName()
auto doMesh3DName(UnsignedInt id) -> std::string virtual
Implementation for mesh3DName()
auto doMesh3D(UnsignedInt id) -> Containers::Optional<MeshData3D> virtual
Implementation for mesh3D()
auto doMaterialCount() const -> UnsignedInt virtual
Implementation for materialCount()
auto doMaterialForName(const std::string& name) -> Int virtual
Implementation for materialForName()
auto doMaterialName(UnsignedInt id) -> std::string virtual
Implementation for materialName()
auto doMaterial(UnsignedInt id) -> std::unique_ptr<AbstractMaterialData> virtual
Implementation for material()
auto doTextureCount() const -> UnsignedInt virtual
Implementation for textureCount()
auto doTextureForName(const std::string& name) -> Int virtual
Implementation for textureForName()
auto doTextureName(UnsignedInt id) -> std::string virtual
Implementation for textureName()
auto doTexture(UnsignedInt id) -> Containers::Optional<TextureData> virtual
Implementation for texture()
auto doImage1DCount() const -> UnsignedInt virtual
Implementation for image1DCount()
auto doImage1DForName(const std::string& name) -> Int virtual
Implementation for image1DForName()
auto doImage1DName(UnsignedInt id) -> std::string virtual
Implementation for image1DName()
auto doImage1D(UnsignedInt id) -> Containers::Optional<ImageData1D> virtual
Implementation for image1D()
auto doImage2DCount() const -> UnsignedInt virtual
Implementation for image2DCount()
auto doImage2DForName(const std::string& name) -> Int virtual
Implementation for image2DForName()
auto doImage2DName(UnsignedInt id) -> std::string virtual
Implementation for image2DName()
auto doImage2D(UnsignedInt id) -> Containers::Optional<ImageData2D> virtual
Implementation for image2D()
auto doImage3DCount() const -> UnsignedInt virtual
Implementation for image3DCount()
auto doImage3DForName(const std::string& name) -> Int virtual
Implementation for image3DForName()
auto doImage3DName(UnsignedInt id) -> std::string virtual
Implementation for image3DName()
auto doImage3D(UnsignedInt id) -> Containers::Optional<ImageData3D> virtual
Implementation for image3D()
auto doImporterState() const -> const void* virtual
Implementation for importerState()

Data accessors

Each function tuple provides access to given data.

auto defaultScene() -> Int
Default scene.
auto sceneCount() const -> UnsignedInt
Scene count.
auto sceneForName(const std::string& name) -> Int
Scene ID for given name.
auto sceneName(UnsignedInt id) -> std::string
Scene name.
auto scene(UnsignedInt id) -> Containers::Optional<SceneData>
Scene.
auto lightCount() const -> UnsignedInt
Light count.
auto lightForName(const std::string& name) -> Int
Light ID for given name.
auto lightName(UnsignedInt id) -> std::string
Light name.
auto light(UnsignedInt id) -> Containers::Optional<LightData>
Light.
auto cameraCount() const -> UnsignedInt
Camera count.
auto cameraForName(const std::string& name) -> Int
Camera ID for given name.
auto cameraName(UnsignedInt id) -> std::string
Camera name.
auto camera(UnsignedInt id) -> Containers::Optional<CameraData>
Camera.
auto object2DCount() const -> UnsignedInt
Two-dimensional object count.
auto object2DForName(const std::string& name) -> Int
Two-dimensional object ID for given name.
auto object2DName(UnsignedInt id) -> std::string
Two-dimensional object name.
auto object2D(UnsignedInt id) -> std::unique_ptr<ObjectData2D>
Two-dimensional object.
auto object3DCount() const -> UnsignedInt
Three-dimensional object count.
auto object3DForName(const std::string& name) -> Int
Three-dimensional object ID for given name.
auto object3DName(UnsignedInt id) -> std::string
Three-dimensional object name.
auto object3D(UnsignedInt id) -> std::unique_ptr<ObjectData3D>
Three-dimensional object.
auto mesh2DCount() const -> UnsignedInt
Two-dimensional mesh count.
auto mesh2DForName(const std::string& name) -> Int
Two-dimensional mesh ID for given name.
auto mesh2DName(UnsignedInt id) -> std::string
Two-dimensional mesh name.
auto mesh2D(UnsignedInt id) -> Containers::Optional<MeshData2D>
Two-dimensional mesh.
auto mesh3DCount() const -> UnsignedInt
Three-dimensional mesh count.
auto mesh3DForName(const std::string& name) -> Int
Three-dimensional mesh ID for given name.
auto mesh3DName(UnsignedInt id) -> std::string
Three-dimensional mesh name.
auto mesh3D(UnsignedInt id) -> Containers::Optional<MeshData3D>
Three-dimensional mesh.
auto materialCount() const -> UnsignedInt
Material count.
auto materialForName(const std::string& name) -> Int
Material ID for given name.
auto materialName(UnsignedInt id) -> std::string
Material name.
auto material(UnsignedInt id) -> std::unique_ptr<AbstractMaterialData>
Material.
auto textureCount() const -> UnsignedInt
Texture count.
auto textureForName(const std::string& name) -> Int
Texture ID for given name.
auto textureName(UnsignedInt id) -> std::string
Texture name.
auto texture(UnsignedInt id) -> Containers::Optional<TextureData>
Texture.
auto image1DCount() const -> UnsignedInt
One-dimensional image count.
auto image1DForName(const std::string& name) -> Int
One-dimensional image ID for given name.
auto image1DName(UnsignedInt id) -> std::string
One-dimensional image name.
auto image1D(UnsignedInt id) -> Containers::Optional<ImageData1D>
One-dimensional image.
auto image2DCount() const -> UnsignedInt
Two-dimensional image count.
auto image2DForName(const std::string& name) -> Int
Two-dimensional image ID for given name.
auto image2DName(UnsignedInt id) -> std::string
Two-dimensional image name.
auto image2D(UnsignedInt id) -> Containers::Optional<ImageData2D>
Two-dimensional image.
auto image3DCount() const -> UnsignedInt
Three-dimensional image count.
auto image3DForName(const std::string& name) -> Int
Three-dimensional image ID for given name.
auto image3DName(UnsignedInt id) -> std::string
Three-dimensional image name.
auto image3D(UnsignedInt id) -> Containers::Optional<ImageData3D>
Three-dimensional image.

Enum documentation

enum class Magnum::Trade::AbstractImporter::Feature: UnsignedByte

Features supported by this importer.

Enumerators
OpenData

Opening files from raw data using openData()

Function documentation

bool Magnum::Trade::AbstractImporter::openData(Containers::ArrayView<const char> data)

Open raw data.

Closes previous file, if it was opened, and tries to open given file. Available only if Feature::OpenData is supported. Returns true on success, false otherwise.

bool Magnum::Trade::AbstractImporter::openFile(const std::string& filename)

Open file.

Closes previous file, if it was opened, and tries to open given file. Returns true on success, false otherwise.

const void* Magnum::Trade::AbstractImporter::importerState() const

Plugin-specific access to internal importer state.

The importer might provide access to its internal data structures for currently opened document through this function. See documentation of particular plugin for more information about returned type and contents. Returns nullptr by default.

void Magnum::Trade::AbstractImporter::doOpenFile(const std::string& filename) virtual protected

Implementation for openFile()

If Feature::OpenData is supported, default implementation opens the file and calls doOpenData() with its contents. It is allowed to call this function from your doOpenFile() implementation.

Int Magnum::Trade::AbstractImporter::doDefaultScene() virtual protected

Implementation for defaultScene()

Default implementation returns -1.

UnsignedInt Magnum::Trade::AbstractImporter::doSceneCount() const virtual protected

Implementation for sceneCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doSceneForName(const std::string& name) virtual protected

Implementation for sceneForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doSceneName(UnsignedInt id) virtual protected

Implementation for sceneName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doLightCount() const virtual protected

Implementation for lightCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doLightForName(const std::string& name) virtual protected

Implementation for lightForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doLightName(UnsignedInt id) virtual protected

Implementation for lightName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doCameraCount() const virtual protected

Implementation for cameraCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doCameraForName(const std::string& name) virtual protected

Implementation for cameraForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doCameraName(UnsignedInt id) virtual protected

Implementation for cameraName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doObject2DCount() const virtual protected

Implementation for object2DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doObject2DForName(const std::string& name) virtual protected

Implementation for object2DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doObject2DName(UnsignedInt id) virtual protected

Implementation for object2DName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doObject3DCount() const virtual protected

Implementation for object3DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doObject3DForName(const std::string& name) virtual protected

Implementation for object3DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doObject3DName(UnsignedInt id) virtual protected

Implementation for object3DName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doMesh2DCount() const virtual protected

Implementation for mesh2DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doMesh2DForName(const std::string& name) virtual protected

Implementation for mesh2DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doMesh2DName(UnsignedInt id) virtual protected

Implementation for mesh2DName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doMesh3DCount() const virtual protected

Implementation for mesh3DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doMesh3DForName(const std::string& name) virtual protected

Implementation for mesh3DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doMesh3DName(UnsignedInt id) virtual protected

Implementation for mesh3DName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doMaterialCount() const virtual protected

Implementation for materialCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doMaterialForName(const std::string& name) virtual protected

Implementation for materialForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doMaterialName(UnsignedInt id) virtual protected

Implementation for materialName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doTextureCount() const virtual protected

Implementation for textureCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doTextureForName(const std::string& name) virtual protected

Implementation for textureForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doTextureName(UnsignedInt id) virtual protected

Implementation for textureName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doImage1DCount() const virtual protected

Implementation for image1DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doImage1DForName(const std::string& name) virtual protected

Implementation for image1DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doImage1DName(UnsignedInt id) virtual protected

Implementation for image1DName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doImage2DCount() const virtual protected

Implementation for image2DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doImage2DForName(const std::string& name) virtual protected

Implementation for image2DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doImage2DName(UnsignedInt id) virtual protected

Implementation for image2DName()

Default implementation returns empty string.

UnsignedInt Magnum::Trade::AbstractImporter::doImage3DCount() const virtual protected

Implementation for image3DCount()

Default implementation returns 0.

Int Magnum::Trade::AbstractImporter::doImage3DForName(const std::string& name) virtual protected

Implementation for image3DForName()

Default implementation returns -1.

std::string Magnum::Trade::AbstractImporter::doImage3DName(UnsignedInt id) virtual protected

Implementation for image3DName()

Default implementation returns empty string.

Int Magnum::Trade::AbstractImporter::defaultScene()

Default scene.

When there is more than one scene, returns ID of the default one. If there is no default scene, returns -1.

Int Magnum::Trade::AbstractImporter::sceneForName(const std::string& name)

Scene ID for given name.

If no scene for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::sceneName(UnsignedInt id)

Scene name.

Parameters
id Scene ID, from range [0, sceneCount()).

Containers::Optional<SceneData> Magnum::Trade::AbstractImporter::scene(UnsignedInt id)

Scene.

Parameters
id Scene ID, from range [0, sceneCount()).

Returns given scene or Containers::NullOpt if import failed.

Int Magnum::Trade::AbstractImporter::lightForName(const std::string& name)

Light ID for given name.

If no light for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::lightName(UnsignedInt id)

Light name.

Parameters
id Light ID, from range [0, lightCount()).

Containers::Optional<LightData> Magnum::Trade::AbstractImporter::light(UnsignedInt id)

Light.

Parameters
id Light ID, from range [0, lightCount()).

Returns given light or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::cameraForName(const std::string& name)

Camera ID for given name.

If no camera for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::cameraName(UnsignedInt id)

Camera name.

Parameters
id Camera ID, from range [0, cameraCount()).

Containers::Optional<CameraData> Magnum::Trade::AbstractImporter::camera(UnsignedInt id)

Camera.

Parameters
id Camera ID, from range [0, cameraCount()).

Returns given camera or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::object2DForName(const std::string& name)

Two-dimensional object ID for given name.

If no scene for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::object2DName(UnsignedInt id)

Two-dimensional object name.

Parameters
id Object ID, from range [0, object2DCount()).

std::unique_ptr<ObjectData2D> Magnum::Trade::AbstractImporter::object2D(UnsignedInt id)

Two-dimensional object.

Parameters
id Object ID, from range [0, object2DCount()).

Returns given object or nullptr if importing failed.

Int Magnum::Trade::AbstractImporter::object3DForName(const std::string& name)

Three-dimensional object ID for given name.

If no scene for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::object3DName(UnsignedInt id)

Three-dimensional object name.

Parameters
id Object ID, from range [0, object3DCount()).

std::unique_ptr<ObjectData3D> Magnum::Trade::AbstractImporter::object3D(UnsignedInt id)

Three-dimensional object.

Parameters
id Object ID, from range [0, object3DCount()).

Returns given object or nullptr if importing failed.

Int Magnum::Trade::AbstractImporter::mesh2DForName(const std::string& name)

Two-dimensional mesh ID for given name.

If no mesh for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::mesh2DName(UnsignedInt id)

Two-dimensional mesh name.

Parameters
id Mesh ID, from range [0, mesh2DCount()).

Containers::Optional<MeshData2D> Magnum::Trade::AbstractImporter::mesh2D(UnsignedInt id)

Two-dimensional mesh.

Parameters
id Mesh ID, from range [0, mesh2DCount()).

Returns given mesh or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::mesh3DForName(const std::string& name)

Three-dimensional mesh ID for given name.

If no mesh for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::mesh3DName(UnsignedInt id)

Three-dimensional mesh name.

Parameters
id Mesh ID, from range [0, mesh3DCount()).

Containers::Optional<MeshData3D> Magnum::Trade::AbstractImporter::mesh3D(UnsignedInt id)

Three-dimensional mesh.

Parameters
id Mesh ID, from range [0, mesh3DCount()).

Returns given mesh or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::materialForName(const std::string& name)

Material ID for given name.

If no material for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::materialName(UnsignedInt id)

Material name.

Parameters
id Material ID, from range [0, materialCount()).

std::unique_ptr<AbstractMaterialData> Magnum::Trade::AbstractImporter::material(UnsignedInt id)

Material.

Parameters
id Material ID, from range [0, materialCount()).

Returns given material or nullptr if importing failed.

Int Magnum::Trade::AbstractImporter::textureForName(const std::string& name)

Texture ID for given name.

If no texture for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::textureName(UnsignedInt id)

Texture name.

Parameters
id Texture ID, from range [0, textureCount()).

Containers::Optional<TextureData> Magnum::Trade::AbstractImporter::texture(UnsignedInt id)

Texture.

Parameters
id Texture ID, from range [0, textureCount()).

Returns given texture or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::image1DForName(const std::string& name)

One-dimensional image ID for given name.

If no image for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::image1DName(UnsignedInt id)

One-dimensional image name.

Parameters
id Image ID, from range [0, image1DCount()).

Containers::Optional<ImageData1D> Magnum::Trade::AbstractImporter::image1D(UnsignedInt id)

One-dimensional image.

Parameters
id Image ID, from range [0, image1DCount()).

Returns given image or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::image2DForName(const std::string& name)

Two-dimensional image ID for given name.

If no image for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::image2DName(UnsignedInt id)

Two-dimensional image name.

Parameters
id Image ID, from range [0, image2DCount()).

Containers::Optional<ImageData2D> Magnum::Trade::AbstractImporter::image2D(UnsignedInt id)

Two-dimensional image.

Parameters
id Image ID, from range [0, image2DCount()).

Returns given image or Containers::NullOpt if importing failed.

Int Magnum::Trade::AbstractImporter::image3DForName(const std::string& name)

Three-dimensional image ID for given name.

If no image for given name exists, returns -1.

std::string Magnum::Trade::AbstractImporter::image3DName(UnsignedInt id)

Three-dimensional image name.

Parameters
id Image ID, from range [0, image3DCount()).

Containers::Optional<ImageData3D> Magnum::Trade::AbstractImporter::image3D(UnsignedInt id)

Three-dimensional image.

Parameters
id Image ID, from range [0, image3DCount()).

Returns given image or Containers::NullOpt if importing failed.