lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
Loading...
Searching...
No Matches
lmgl::assets::ModelLoader Class Reference

Class for loading 3D models using Assimp. More...

#include <model_loader.hpp>

Static Public Member Functions

static std::shared_ptr< scene::Nodeload (const std::string &fpath, std::shared_ptr< renderer::Shader > shader, const ModelLoadOptions &options)
 Load a 3D model from a file.
 

Detailed Description

Class for loading 3D models using Assimp.

This class provides functions to load 3D models from various file formats using the Assimp library. It handles the processing of meshes, materials, and textures, and constructs a scene graph representation of the model.

Member Function Documentation

◆ load()

std::shared_ptr< scene::Node > lmgl::assets::ModelLoader::load ( const std::string & fpath,
std::shared_ptr< renderer::Shader > shader,
const ModelLoadOptions & options )
static

Load a 3D model from a file.

This function loads a 3D model from the specified file path using the Assimp library. It processes the model's meshes, materials, and textures, and constructs a scene graph representation of the model.

Parameters
fpathThe file path to the 3D model.
shaderA shared pointer to the shader to be used for rendering the model.
optionsOptions for loading the model.
Returns
A shared pointer to the root node of the loaded model's scene graph.

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