class new in 2020.06StlImporter
STL importer plugin.
Imports normal and vertex information from binary Stereolitography STL files.
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(WITH_STLIMPORTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::StlImporter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your
modules/ directory, request the
StlImporter component of the
MagnumPlugins package and link to the
find_package(MagnumPlugins REQUIRED StlImporter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::StlImporter)
The file is always imported as a non-indexed triangle mesh with per-face normals (i.e., same normal for all vertices in the triangle). Both positions and normals are imported as VertexFormat::
- class AbstractImporter
- Base for importer plugins.