Nameless Engine
Loading...
Searching...
No Matches
ne::MeshImporter Class Reference

#include <MeshImporter.h>

Static Public Member Functions

static std::optional< ErrorimportMesh (const std::filesystem::path &pathToFile, const std::string &sPathToOutputDirRelativeRes, const std::string &sOutputDirectoryName, const std::function< void(std::string_view)> &onProgress)
 

Detailed Description

Provides static functions for importing files in special formats (such as GLTF/GLB) as meshes, textures, etc. into engine formats (such as nodes).

Member Function Documentation

◆ 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
pathToFilePath to the file to import.
sPathToOutputDirRelativeResPath to a directory relative to the res directory that will store results, for example: game/models (located at res/game/models).
sOutputDirectoryNameName 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.
onProgressCallback 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: