#include <MeshImporter.h>
|
static std::optional< Error > | importMesh (const std::filesystem::path &pathToFile, const std::string &sPathToOutputDirRelativeRes, const std::string &sOutputDirectoryName, const std::function< void(std::string_view)> &onProgress) |
|
Provides static functions for importing files in special formats (such as GLTF/GLB) as meshes, textures, etc. into engine formats (such as nodes).
◆ importMesh()
std::optional< Error > ne::MeshImporter::importMesh |
( |
const std::filesystem::path & |
pathToFile, |
|
|
const std::string & |
sPathToOutputDirRelativeRes, |
|
|
const std::string & |
sOutputDirectoryName, |
|
|
const std::function< void(std::string_view)> & |
onProgress |
|
) |
| |
|
static |
Imports a file in a special format (such as GTLF/GLB) and converts information from the file to a new node tree with materials and textures (if the specified file defines them).
- Parameters
-
pathToFile | Path to the file to import. |
sPathToOutputDirRelativeRes | Path to a directory relative to the res directory that will store results, for example: game/models (located at res/game/models ). |
sOutputDirectoryName | Name of the new directory that does not exists yet but will be created in the specified directory (relative to the res ) to store the results (allowed characters A-z and numbers 0-9, maximum length is 10 characters), for example: mesh . |
onProgress | Callback that will be called to report some text description of the current import stage. |
- Returns
- Error if something went wrong.
The documentation for this class was generated from the following files:
- src/engine_lib/public/io/MeshImporter.h
- src/engine_lib/private/io/MeshImporter.cpp