class new in 2020.06StanfordSceneConverter
Stanford PLY converter plugin.
Exports to either Little- or Big-Endian binary files with triangle faces.
This plugin depends on the Trade library and is built if
WITH_STANFORDSCENECONVERTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load
"StanfordSceneConverter" via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(WITH_STANFORDSCENECONVERTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::StanfordSceneConverter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your
modules/ directory, request the
StanfordSceneConverter component of the
MagnumPlugins package and link to the
find_package(MagnumPlugins REQUIRED StanfordSceneConverter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::StanfordSceneConverter)
Exports the following attributes, custom attributes and attributes not listed below are skipped with a warning:
Position, written as
z. 2D positions are not supported.
alpha, if the input is four-channel
ObjectId by default as
object_id, use the
objectIdAttributeconfiguration option to change the identifier that's being written.
Supported component formats — attributes of other formats and implementation-specific formats are skipped with a warning:
Float, written as
UnsignedByte / VertexFormat:: UnsignedByteNormalized as
Byte / VertexFormat:: ByteNormalized as
UnsignedShort / VertexFormat:: UnsignedShortNormalized as
Short / VertexFormat:: ShortNormalized as
Index type of the input mesh is preserved, written as
uint. Face size is always
3, written as
uchar. if the mesh is not indexed, a trivial index buffer of type MeshIndexType::
The data are by default exported in machine endian, use the
endianness configuration option to perform an endian swap on the output data.
It's possible to tune various import options through configuration(). See below for all options and their default values:
[configuration] # Endianness of the output. Valid values are little, big and native (which will # choose either big or little depending on the platform) endianness=native # The non-standard MeshAttribute::ObjectId is by default written under this # name. Change if you want to use a different identifier. objectIdAttribute=object_id