![]() |
Blue Brain BioExplorer
|
#include <LoaderRegistry.h>
Public Member Functions | |
void | registerLoader (std::unique_ptr< Loader > loader) |
const std::vector< LoaderInfo > & | getLoaderInfos () const |
bool | isSupportedFile (const std::string &filename) const |
bool | isSupportedType (const std::string &type) const |
const Loader & | getSuitableLoader (const std::string &filename, const std::string &filetype, const std::string &loaderName) const |
void | load (const std::string &path, Scene &scene, const Matrix4f &transformation, const size_t materialID, LoaderProgress cb) |
void | clear () |
void | registerArchiveLoader (std::unique_ptr< Loader > loader) |
Holds information about registered loaders and helps invoking the appropriate loader for a given blob or file.
Definition at line 42 of file LoaderRegistry.h.
void core::LoaderRegistry::clear | ( | ) |
Definition at line 94 of file LoaderRegistry.cpp.
const std::vector< LoaderInfo > & core::LoaderRegistry::getLoaderInfos | ( | ) | const |
Get a list of loaders and their supported file extensions and properties
Definition at line 35 of file LoaderRegistry.cpp.
const Loader & core::LoaderRegistry::getSuitableLoader | ( | const std::string & | filename, |
const std::string & | filetype, | ||
const std::string & | loaderName | ||
) | const |
Get a loader that matches the provided name, filetype or loader name.
std::runtime_error | if no loader found. |
Definition at line 64 of file LoaderRegistry.cpp.
bool core::LoaderRegistry::isSupportedFile | ( | const std::string & | filename | ) | const |
Definition at line 40 of file LoaderRegistry.cpp.
bool core::LoaderRegistry::isSupportedType | ( | const std::string & | type | ) | const |
Definition at line 54 of file LoaderRegistry.cpp.
void core::LoaderRegistry::load | ( | const std::string & | path, |
Scene & | scene, | ||
const Matrix4f & | transformation, | ||
const size_t | materialID, | ||
LoaderProgress | cb | ||
) |
Load the given file or folder into the given scene by choosing the first matching loader based on the filename or filetype.
path | the file or folder containing the data to import |
scene | the scene where to add the loaded model to |
transformation | the transformation to apply for the added model |
materialID | the default material ot use |
cb | the callback for progress updates from the loader |
void core::LoaderRegistry::registerArchiveLoader | ( | std::unique_ptr< Loader > | loader | ) |
Definition at line 101 of file LoaderRegistry.cpp.
void core::LoaderRegistry::registerLoader | ( | std::unique_ptr< Loader > | loader | ) |
Register the given loader.
Definition at line 29 of file LoaderRegistry.cpp.