Voltray Engine Docs
Loading...
Searching...
No Matches
Engine::Loader::MeshLoader Class Reference

Main mesh loading facade that manages multiple format loaders. More...

#include <MeshLoader.h>

Static Public Member Functions

static std::shared_ptr< MeshLoadMesh (const std::string &filepath)
 Load a single mesh from file (first mesh if file contains multiple)
 
static std::vector< std::shared_ptr< Mesh > > LoadMeshes (const std::string &filepath)
 Load all meshes from file.
 
static std::vector< MeshDataLoadMeshData (const std::string &filepath)
 Load raw mesh data for custom processing.
 
static bool IsFormatSupported (const std::string &filepath)
 Check if file format is supported.
 
static std::vector< std::string > GetSupportedFormats ()
 Get list of all supported file extensions.
 
static std::vector< std::pair< std::string, std::vector< std::string > > > GetLoaderInfo ()
 Get information about available loaders.
 

Detailed Description

Main mesh loading facade that manages multiple format loaders.

This class provides a clean interface for loading 3D models from external files. It automatically selects the appropriate loader based on file extension and supports a wide range of formats through different loader implementations.

Member Function Documentation

◆ GetLoaderInfo()

std::vector< std::pair< std::string, std::vector< std::string > > > MeshLoader::GetLoaderInfo ( )
static

Get information about available loaders.

Returns
Vector of loader names and their supported formats

◆ GetSupportedFormats()

std::vector< std::string > MeshLoader::GetSupportedFormats ( )
static

Get list of all supported file extensions.

Returns
Vector of supported extensions (e.g., ".obj", ".fbx")

◆ IsFormatSupported()

bool MeshLoader::IsFormatSupported ( const std::string &  filepath)
static

Check if file format is supported.

Parameters
filepathPath to check
Returns
True if format is supported

◆ LoadMesh()

std::shared_ptr< Mesh > MeshLoader::LoadMesh ( const std::string &  filepath)
static

Load a single mesh from file (first mesh if file contains multiple)

Parameters
filepathPath to the mesh file
Returns
Shared pointer to loaded mesh, or nullptr if failed

◆ LoadMeshData()

std::vector< MeshData > MeshLoader::LoadMeshData ( const std::string &  filepath)
static

Load raw mesh data for custom processing.

Parameters
filepathPath to the mesh file
Returns
Vector of MeshData structures

◆ LoadMeshes()

std::vector< std::shared_ptr< Mesh > > MeshLoader::LoadMeshes ( const std::string &  filepath)
static

Load all meshes from file.

Parameters
filepathPath to the mesh file
Returns
Vector of shared pointers to all loaded meshes

The documentation for this class was generated from the following files: