-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathAssimpImporter.h
466 lines (388 loc) · 22.5 KB
/
AssimpImporter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
#ifndef Magnum_Trade_AssimpImporter_h
#define Magnum_Trade_AssimpImporter_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021 Vladimír Vondruš <[email protected]>
Copyright © 2017 Jonathan Hale <[email protected]>
Copyright © 2021 Pablo Escobar <[email protected]>
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.
*/
/** @file
* @brief Class @ref Magnum::Trade::AssimpImporter
*/
#include <Magnum/Trade/AbstractImporter.h>
#include "MagnumPlugins/AssimpImporter/configure.h"
#ifndef DOXYGEN_GENERATING_OUTPUT
#ifndef MAGNUM_ASSIMPIMPORTER_BUILD_STATIC
#ifdef AssimpImporter_EXPORTS
#define MAGNUM_ASSIMPIMPORTER_EXPORT CORRADE_VISIBILITY_EXPORT
#else
#define MAGNUM_ASSIMPIMPORTER_EXPORT CORRADE_VISIBILITY_IMPORT
#endif
#else
#define MAGNUM_ASSIMPIMPORTER_EXPORT CORRADE_VISIBILITY_STATIC
#endif
#define MAGNUM_ASSIMPIMPORTER_LOCAL CORRADE_VISIBILITY_LOCAL
#else
#define MAGNUM_ASSIMPIMPORTER_EXPORT
#define MAGNUM_ASSIMPIMPORTER_LOCAL
#endif
#ifndef DOXYGEN_GENERATING_OUTPUT
namespace Assimp {
class Importer;
class IOSystem;
}
#endif
namespace Magnum { namespace Trade {
/**
@brief Assimp importer
@m_keywords{3dsImporter Ac3dImporter BlenderImporter BvhImporter CsmImporter}
@m_keywords{ColladaImporter DirectXImporter DxfImporter FbxImporter}
@m_keywords{GltfImporter IfcImporter IrrlichtImporter LightWaveImporter}
@m_keywords{ModoImporter MilkshapeImporter ObjImporter OgreImporter}
@m_keywords{OpenGexImporter StanfordImporter StlImporter TrueSpaceImporter}
@m_keywords{UnrealImporter ValveImporter XglImporter}
Imports various formats using [Assimp](http://assimp.org), in particular:
- Autodesk FBX (`*.fbx`)
- COLLADA (`*.dae`)
- glTF (`*.gltf`, `*.glb`)
- Blender 3D (`*.blend`)
- 3ds Max 3DS and ASE (`*.3ds`, `*.ase`)
- Wavefront OBJ (`*.obj`)
- Industry Foundation Classes (IFC/Step) (`*.ifc`)
- XGL (`*.xgl`, `*.zgl`)
- Stanford PLY (`*.ply`)
- AutoCAD DXF (`*.dxf`)
- LightWave, LightWave Scene (`*.lwo`, `*.lws`)
- Modo (`*.lxo`)
- Stereolithography (`*.stl`)
- DirectX X (`*.x`)
- AC3D (`*.ac`)
- Milkshape 3D (`*.ms3d`)
- TrueSpace (`*.cob`, `*.scn`)
- Biovision BVH (`*.bvh`)
- CharacterStudio Motion (`*.csm`)
- Ogre XML (`*.xml`)
- Irrlicht Mesh and Scene (`*.irrmesh`, `*.irr`)
- Quake I (`*.mdl`)
- Quake II (`*.md2`)
- Quake III Mesh (`*.md3`)
- Quake III Map/BSP (`*.pk3`)
- Return to Castle Wolfenstein (`*.mdc`)
- Doom 3 (`*.md5*`)
- Valve Model (`*.smd`, `*.vta`)
- Open Game Engine Exchange (`*.ogex`)
- Unreal (`*.3d`)
- BlitzBasic 3D (`*.b3d`)
- Quick3D (`*.q3d`, `*.q3s`)
- Neutral File Format (`*.nff`)
- Sense8 WorldToolKit (`*.nff`)
- Object File Format (`*.off`)
- PovRAY Raw (`*.raw`)
- Terragen Terrain (`*.ter`)
- 3D GameStudio (3DGS), 3D GameStudio (3DGS) Terrain (`*.mdl`, `*.hmp`)
- Izware Nendo (`*.ndo`)
Supports importing of scene, object, camera, mesh, texture and image data.
This plugin provides `3dsImporter`, `Ac3dImporter`, `BlenderImporter`,
`BvhImporter`, `CsmImporter`, `ColladaImporter`, `DirectXImporter`,
`DxfImporter`, `FbxImporter`, `GltfImporter`, `IfcImporter`,
`IrrlichtImporter`, `LightWaveImporter`, `ModoImporter`, `MilkshapeImporter`,
`ObjImporter`, `OgreImporter`, `OpenGexImporter`, `StanfordImporter`,
`StlImporter`, `TrueSpaceImporter`, `UnrealImporter`, `ValveImporter` and
`XglImporter` plugins.
@m_class{m-block m-success}
@thirdparty This plugin makes use of the [Assimp](http://assimp.org) library,
licensed under @m_class{m-label m-success} **BSD 3-clause**
([license text](http://assimp.org/index.php/license),
[choosealicense.com](https://choosealicense.com/licenses/bsd-3-clause/)).
It requires attribution for public use.
@section Trade-AssimpImporter-usage Usage
This plugin depends on the @ref Trade and [Assimp](http://assimp.org) libraries
and the @ref AnyImageImporter plugin and is built if `WITH_ASSIMPIMPORTER` is
enabled when building Magnum Plugins. To use as a dynamic plugin, load
@cpp "AssimpImporter" @ce via @ref Corrade::PluginManager::Manager.
Additionally, if you're using Magnum as a CMake subproject, bundle the
[magnum-plugins](https://github.com/mosra/magnum-plugins) and
[assimp](https://github.com/assimp/assimp) repositories and do the following.
If you want to use system-installed Assimp, omit the first part and point
`CMAKE_PREFIX_PATH` to its installation dir if necessary.
@code{.cmake}
# Disable Assimp tests, tools and exporter functionality
set(ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "" FORCE)
set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(ASSIMP_NO_EXPORT ON CACHE BOOL "" FORCE)
# If you won't be accessing Assimp outside of the plugin, build it as static to
# have the plugin binary self-contained
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
# The following is important to avoid Assimp appending `d` to all your
# binaries. You need Assimp >= 5.0.0 for this to work, also note that after
# 5.0.1 this option is prefixed with ASSIMP_, so better set both variants.
set(INJECT_DEBUG_POSTFIX OFF CACHE BOOL "" FORCE)
set(ASSIMP_INJECT_DEBUG_POSTFIX OFF CACHE BOOL "" FORCE)
add_subdirectory(assimp EXCLUDE_FROM_ALL)
set(WITH_ANYIMAGEIMPORTER ON CACHE BOOL "" FORCE)
add_subdirectory(magnum EXCLUDE_FROM_ALL)
set(WITH_ASSIMPIMPORTER ON CACHE BOOL "" FORCE)
add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL)
# So the dynamically loaded plugin gets built implicitly
add_dependencies(your-app MagnumPlugins::AssimpImporter)
@endcode
To use as a static plugin or as a dependency of another plugin with CMake, put
[FindMagnumPlugins.cmake](https://github.com/mosra/magnum-plugins/blob/master/modules/FindMagnumPlugins.cmake)
and [FindAssimp.cmake](https://github.com/mosra/magnum-plugins/blob/master/modules/FindAssimp.cmake)
into your `modules/` directory, request the `AssimpImporter` component of the
`MagnumPlugins` package and link to the `MagnumPlugins::AssimpImporter` target:
@code{.cmake}
find_package(MagnumPlugins REQUIRED AssimpImporter)
# ...
target_link_libraries(your-app PRIVATE MagnumPlugins::AssimpImporter)
@endcode
See @ref building-plugins, @ref cmake-plugins, @ref plugins and
@ref file-formats for more information.
@section Trade-AssimpImporter-behavior Behavior and limitations
The plugin supports @ref ImporterFeature::OpenData, @relativeref{ImporterFeature,OpenState} and @relativeref{ImporterFeature,FileCallback} features. The Assimp library loads
everything during initial import, meaning all external file loading callbacks
are called with @ref InputFileCallbackPolicy::LoadTemporary and the resources
can be safely freed right after the @ref openData() / @ref openFile() function
exits. In some cases, Assimp will explicitly call
@ref InputFileCallbackPolicy::Close on the opened file and then open it again.
In case of images, the files are loaded on-demand inside @ref image2D() calls
with @ref InputFileCallbackPolicy::LoadTemporary and
@ref InputFileCallbackPolicy::Close is emitted right after the file is fully
read.
Import of skeleton, skin and morph data is not supported at the moment.
The importer recognizes @ref ImporterFlag::Verbose, enabling verbose logging
in Assimp when the flag is enabled. However please note that since Assimp
handles logging through a global singleton, it's not possible to have different
verbosity levels in each instance.
@subsection Trade-AssimpImporter-behavior-animation Animation import
- Assimp sometimes adds dummy animation tracks with a single key-value pair
and the default node transformation. If found, the importer removes these
dummy tracks and prints a message if verbose logging is enabled. Can be
disabled per-animation with the @cb{.ini} removeDummyAnimationTracks @ce
option, see @ref Trade-AssimpImporter-configuration "below".
- Channel order within animations is not always preserved
by Assimp, depending on file type and compiler. You may have to manually
order tracks by type and target after importing.
- Quaternion rotation tracks are postprocessed in order to make it
possible to use the faster
@ref Math::lerp(const Quaternion<T>&, const Quaternion<T>&, T) "Math::lerp()" /
@ref Math::slerp(const Quaternion<T>&, const Quaternion<T>&, T) "Math::slerp()"
functions instead of
@ref Math::lerpShortestPath(const Quaternion<T>&, const Quaternion<T>&, T) "Math::lerpShortestPath()" /
@ref Math::slerpShortestPath(const Quaternion<T>&, const Quaternion<T>&, T) "Math::slerpShortestPath()".
Can be disabled per-animation with the
@cb{.ini} optimizeQuaternionShortestPath @ce option, see
@ref Trade-AssimpImporter-configuration "below".
- If quaternion rotation tracks are not normalized, the importer
prints a warning and normalizes them. Can be disabled per-animation with
the @cb{.ini} normalizeQuaternions @ce option, see
@ref Trade-AssimpImporter-configuration "below".
- Skeletons and skins are not supported
- Morph targets are not supported
- Animation tracks are always imported with
@ref Animation::Interpolation::Linear, because Assimp doesn't expose any
interpolation modes
- Animation tracks using `aiAnimBehaviour_DEFAULT` or `aiAnimBehaviour_REPEAT`
are currently not implemented and fall back to using
@ref Animation::Extrapolation::Constant
- It's possible to request all animation clips to be merged into one using
the @cb{.ini} mergeAnimationClips @ce option in order to for example
preserve cinematic animations when using the Blender glTF exporter (as it
otherwise outputs a separate clip for each object). When this option is
enabled, @ref animationCount() always report either @cpp 0 @ce or
@cpp 1 @ce and the merged animation has no name. With this option enabled,
however, it can happen that multiple conflicting tracks affecting the same
node are merged in the same clip, causing the animation to misbehave.
- Assimp versions before commit [e3083c21f0a7beae6c37a2265b7919a02cbf83c4](https://github.com/assimp/assimp/commit/e3083c21f0a7beae6c37a2265b7919a02cbf83c4)
read spline-interpolated glTF animation tracks incorrectly and produce
broken animations. A warning is printed when importing glTF animations on
these versions.
Because it's impossible to detect the actual brokenness, the warning is
printed even if the imported data may be correct.
@subsection Trade-AssimpImporter-behavior-materials Material import
- Only materials with shading mode `aiShadingMode_Phong` are supported
- Two-sided property and alpha mode is not imported
- Assimp seems to ignore ambient textures in COLLADA files
- For some reason, Assimp 4.1 imports STL models with ambient set to
@cpp 0xffffff_srgbf @ce, which causes all other color information to be
discarded. If such a case is detected and there's no ambient texture
present, the ambient is forced back to @cpp 0x000000_srgbf @ce. See also
[assimp/assimp#2059](https://github.com/assimp/assimp/issues/2059). This
workaround can be disabled using the @cb{.ini} forceWhiteAmbientToBlack @ce
@ref Trade-AssimpImporter-configuration "configuration option".
@subsection Trade-AssimpImporter-behavior-lights Light import
- @ref LightData::intensity() is always @cpp 1.0f @ce, instead Assimp
premultiplies @ref LightData::color() with the intensity
- Ambient lights are imported as @ref LightData::Type::Point with attenuation
set to @cpp {1.0f, 0.0f, 0.0f} @ce
- The following properties are ignored:
- Specular color
- Custom light orientation vectors --- the orientation is always only
inherited from the node containing the light
- Area lights are not supported
@subsection Trade-AssimpImporter-behavior-cameras Camera import
- Aspect and up vector properties are not imported
@subsection Trade-AssimpImporter-behavior-meshes Mesh import
- Only point, triangle, and line meshes are loaded (quad and poly meshes
are triangularized by Assimp)
- Custom mesh attributes (such as `object_id` in Stanford PLY files) are
not imported.
- Texture coordinate layers with other than two components are skipped
- For some file formats (such as COLLADA), Assimp may create a dummy
"skeleton visualizer" mesh if the file has no mesh data. For others (such
as glTF) not.
- Per-face attributes in Stanford PLY files are not imported.
- Stanford PLY files that contain a comment before the format line fail to
import.
- The importer follows types used by Assimp, thus indices are always
@ref MeshIndexType::UnsignedInt, positions, normals, tangents and
bitangents are always imported as @ref VertexFormat::Vector3, texture
coordinates as @ref VertexFormat::Vector2 and colors as
@ref VertexFormat::Vector4. In other words, everything gets expanded by
Assimp to floats, even if the original file might be using different types.
- The imported model always has either both @ref MeshAttribute::Tangent
@ref MeshAttribute::Bitangent or neither of them, tangents are always
three-component with binormals separate.
- Multi-mesh nodes and multi-primitive meshes are loaded as follows,
consistently with the behavior of @link TinyGltfImporter @endlink:
- Multi-primitive meshes are split by Assimp into individual meshes
- The @ref meshCount() query returns a number of all *primitives*, not
meshes
- The @ref object3DCount() query returns a number of all nodes extended
with number of extra objects for each additional mesh
- Each node referencing a multiple meshes is split into a sequence
of @ref MeshObjectData3D instances following each other; the extra
nodes being a direct and immediate children of the first one with an
identity transformation
- @ref object3DForName() points to the first object containing the first
mesh, @ref object3DName() returns the same name for all objects in
given sequence
The mesh is always indexed; positions are always present, normals, colors and
texture coordinates are optional.
@subsection Trade-AssimpImporter-behavior-textures Texture import
- Textures with mapping mode/wrapping `aiTextureMapMode_Decal` are loaded
with @ref SamplerWrapping::ClampToEdge
- Assimp does not appear to load any filtering information
- Raw embedded image data is not supported
@subsection Trade-AssimpImporter-behavior-scene Scene import
- For some file formats (such as COLLADA), Assimp fails to load the file if
it doesn't contain any scene. For some (such as glTF) it will succeed and
@ref sceneCount() / @ref object3DCount() will return zero.
- If the root node imported by Assimp has children, it's ignored and only its
children are exposed through @ref object3D(). On the other hand, for
example in presence of @ref Trade-AssimpImporter-configuration "postprocessing flags"
such as `PreTransformVertices`, there's sometimes just a single root node.
In that case the single node is imported as a single @ref object3D()
instead of being ignored.
@section Trade-AssimpImporter-configuration Plugin-specific configuration
Assimp has a versatile set of configuration options and processing operations
applied on imported scenes. A subset of these is exposed via
@ref configuration(), the full form shown below. The first group of options
matches the [AI_CONFIG_*](http://assimp.sourceforge.net/lib_html/config_8h.html)
macros and has to be applied before opening first file with given plugin
instance; to change them again you need to create a new importer instance.
The @cb{.conf} [postprocess] @ce subgroup contains boolean toggles that
correspond to the [aiPostProcessSteps](http://assimp.sourceforge.net/lib_html/postprocess_8h.html#a64795260b95f5a4b3f3dc1be4f52e410)
enum. Some of them are enabled by default, some not; options for not yet
supported features are omitted. These are passed to Assimp when opening a file,
meaning a change in these will be always applied to the next opened file.
@snippet MagnumPlugins/AssimpImporter/AssimpImporter.conf configuration_
@section Trade-AssimpImporter-state Access to internal importer state
The Assimp structures used to import data from a file can be accessed through
importer state methods:
- Calling @ref importerState() returns pointer to the imported `aiScene`
- Calling `*::importerState()` on data class instances returned from this
importer return pointers to matching assimp structures:
- @ref AbstractMaterialData::importerState() returns `aiMaterial`
- @ref CameraData::importerState() returns `aiCamera`
- @ref TextureData::importerState() returns `std::pair<const aiMaterial*, aiTextureType>`,
in which the first texture of given type in given material is referred to.
- @ref MeshData::importerState() returns `aiMesh`
- @ref ObjectData3D::importerState() returns `aiNode`
- @ref LightData::importerState() returns `aiLight`
- @ref ImageData2D::importerState() may return `aiTexture`, if texture was embedded
into the loaded file.
- @ref AnimationData::importerState() returns `aiAnimation`
- @ref openState() expects a pointer to an Assimp scene (i.e., `const aiScene*`)
and optionally a path (in order to be able to load textures, if needed)
@todo There are more formats mentioned at http://assimp.sourceforge.net/main_features_formats.html, add aliases for them?
*/
class MAGNUM_ASSIMPIMPORTER_EXPORT AssimpImporter: public AbstractImporter {
public:
/**
* @brief Default constructor
*
* In case you want to open images, use
* @ref AssimpImporter(PluginManager::Manager<AbstractImporter>&)
* instead.
*/
explicit AssimpImporter();
/**
* @brief Constructor
*
* The plugin needs access to plugin manager for importing images.
*/
explicit AssimpImporter(PluginManager::Manager<AbstractImporter>& manager);
/** @brief Plugin manager constructor */
explicit AssimpImporter(PluginManager::AbstractManager& manager, const std::string& plugin);
~AssimpImporter();
private:
struct File;
MAGNUM_ASSIMPIMPORTER_LOCAL ImporterFeatures doFeatures() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL bool doIsOpened() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL void doSetFlags(ImporterFlags flags) override;
MAGNUM_ASSIMPIMPORTER_LOCAL void doSetFileCallback(Containers::Optional<Containers::ArrayView<const char>>(*callback)(const std::string&, InputFileCallbackPolicy, void*), void* userData) override;
MAGNUM_ASSIMPIMPORTER_LOCAL void doOpenData(Containers::ArrayView<const char> data) override;
MAGNUM_ASSIMPIMPORTER_LOCAL void doOpenState(const void* state, const std::string& filePath) override;
MAGNUM_ASSIMPIMPORTER_LOCAL void doOpenFile(const std::string& filename) override;
MAGNUM_ASSIMPIMPORTER_LOCAL void doClose() override;
MAGNUM_ASSIMPIMPORTER_LOCAL Int doDefaultScene() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doSceneCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<SceneData> doScene(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doCameraCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<CameraData> doCamera(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doObject3DCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Int doObject3DForName(const std::string& name) override;
MAGNUM_ASSIMPIMPORTER_LOCAL std::string doObject3DName(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Pointer<ObjectData3D> doObject3D(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doLightCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<LightData> doLight(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doMeshCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<MeshData> doMesh(UnsignedInt id, UnsignedInt level) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doMaterialCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Int doMaterialForName(const std::string& name) override;
MAGNUM_ASSIMPIMPORTER_LOCAL std::string doMaterialName(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<MaterialData> doMaterial(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doTextureCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<TextureData> doTexture(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL AbstractImporter* setupOrReuseImporterForImage(UnsignedInt id, const char* errorPrefix);
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doImage2DCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doImage2DLevelCount(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<ImageData2D> doImage2D(UnsignedInt id, UnsignedInt level) override;
MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doAnimationCount() const override;
MAGNUM_ASSIMPIMPORTER_LOCAL std::string doAnimationName(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL Int doAnimationForName(const std::string& name) override;
MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional<AnimationData> doAnimation(UnsignedInt id) override;
MAGNUM_ASSIMPIMPORTER_LOCAL const void* doImporterState() const override;
Containers::Pointer<Assimp::Importer> _importer;
Assimp::IOSystem* _ourFileCallback;
Containers::Pointer<File> _f;
};
}}
#endif