Magnum::Trade::StanfordImporter class

Stanford PLY importer plugin.

Supports little and big endian binary format (ASCII files are not supported), triangle/quad meshes (edge properties are not supported). Vertex positions and vertex colors (if any) are imported, you can generate the normals using either MeshTools::generateFlatNormals() / MeshTools::generateSmoothNormals() or by passing MeshTools::CompileFlag::GenerateFlatNormals / MeshTools::CompileFlag::GenerateSmoothNormals to MeshTools::compile().

Usage

This plugin depends on the Trade library and is built if WITH_STANFORDIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, load "StanfordImporter" via Corrade::PluginManager::Manager.

Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:

set(WITH_STANFORDIMPORTER ON CACHE BOOL "" FORCE)
add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL)

# So the dynamically loaded plugin gets built implicitly
add_dependencies(your-app MagnumPlugins::StanfordImporter)

To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your modules/ directory, request the StanfordImporter component of the MagnumPlugins package and link to the MagnumPlugins::StanfordImporter target:

find_package(MagnumPlugins REQUIRED StanfordImporter)

# ...
target_link_libraries(your-app PRIVATE MagnumPlugins::StanfordImporter)

See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.

Base classes

class AbstractImporter
Base for importer plugins.

Constructors, destructors, conversion operators

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