Lugdunum  0.1.0
Classes | Public Member Functions | Private Member Functions | List of all members
lug::Graphics::GltfLoader Class Referencefinal

Class for loading glTF files. More...

#include <GltfLoader.hpp>

Inheritance diagram for lug::Graphics::GltfLoader:
[legend]
Collaboration diagram for lug::Graphics::GltfLoader:
[legend]

Classes

struct  LoadedAssets
 

Public Member Functions

 GltfLoader (Renderer &renderer)
 
 GltfLoader (const GltfLoader &)=delete
 
 GltfLoader (GltfLoader &&)=delete
 
GltfLoaderoperator= (const GltfLoader &)=delete
 
GltfLoaderoperator= (GltfLoader &&)=delete
 
 ~GltfLoader ()=default
 
Resource::SharedPtr< ResourceloadFile (const std::string &filename) override final
 Loads a glTF ressource from a file. More...
 
- Public Member Functions inherited from lug::Graphics::Loader
 Loader (Renderer &renderer)
 
 Loader (const Loader &)=delete
 
 Loader (Loader &&)=delete
 
Loaderoperator= (const Loader &)=delete
 
Loaderoperator= (Loader &&)=delete
 
virtual ~Loader ()=default
 

Private Member Functions

Resource::SharedPtr< Render::TexturecreateTexture (Renderer &renderer, const gltf2::Asset &asset, GltfLoader::LoadedAssets &loadedAssets, int32_t index)
 
Resource::SharedPtr< Render::MaterialcreateMaterial (Renderer &renderer, const gltf2::Asset &asset, GltfLoader::LoadedAssets &loadedAssets, int32_t index)
 
Resource::SharedPtr< Render::MaterialcreateDefaultMaterial (Renderer &renderer, GltfLoader::LoadedAssets &loadedAssets)
 
Resource::SharedPtr< Render::MeshcreateMesh (Renderer &renderer, const gltf2::Asset &asset, GltfLoader::LoadedAssets &loadedAssets, int32_t index)
 
bool createNode (Renderer &renderer, const gltf2::Asset &asset, GltfLoader::LoadedAssets &loadedAssets, int32_t index, Scene::Node &parent)
 

Additional Inherited Members

- Protected Attributes inherited from lug::Graphics::Loader
Renderer_renderer
 

Detailed Description

Class for loading glTF files.

Definition at line 22 of file GltfLoader.hpp.

Constructor & Destructor Documentation

◆ GltfLoader() [1/3]

lug::Graphics::GltfLoader::GltfLoader ( Renderer renderer)

Definition at line 22 of file GltfLoader.cpp.

◆ GltfLoader() [2/3]

lug::Graphics::GltfLoader::GltfLoader ( const GltfLoader )
delete

◆ GltfLoader() [3/3]

lug::Graphics::GltfLoader::GltfLoader ( GltfLoader &&  )
delete

◆ ~GltfLoader()

lug::Graphics::GltfLoader::~GltfLoader ( )
default

Member Function Documentation

◆ operator=() [1/2]

GltfLoader& lug::Graphics::GltfLoader::operator= ( const GltfLoader )
delete

◆ operator=() [2/2]

GltfLoader& lug::Graphics::GltfLoader::operator= ( GltfLoader &&  )
delete

◆ loadFile()

Resource::SharedPtr< Resource > lug::Graphics::GltfLoader::loadFile ( const std::string &  filename)
finaloverridevirtual

Loads a glTF ressource from a file.

Parameters
[in]filenameThe filename
Returns
SharedPtr to the resulting Resource

Implements lug::Graphics::Loader.

Definition at line 448 of file GltfLoader.cpp.

◆ createTexture()

Resource::SharedPtr< Render::Texture > lug::Graphics::GltfLoader::createTexture ( Renderer renderer,
const gltf2::Asset &  asset,
GltfLoader::LoadedAssets loadedAssets,
int32_t  index 
)
private

Definition at line 81 of file GltfLoader.cpp.

◆ createMaterial()

Resource::SharedPtr< Render::Material > lug::Graphics::GltfLoader::createMaterial ( Renderer renderer,
const gltf2::Asset &  asset,
GltfLoader::LoadedAssets loadedAssets,
int32_t  index 
)
private

Definition at line 168 of file GltfLoader.cpp.

◆ createDefaultMaterial()

Resource::SharedPtr< Render::Material > lug::Graphics::GltfLoader::createDefaultMaterial ( Renderer renderer,
GltfLoader::LoadedAssets loadedAssets 
)
private

Definition at line 253 of file GltfLoader.cpp.

◆ createMesh()

Resource::SharedPtr< Render::Mesh > lug::Graphics::GltfLoader::createMesh ( Renderer renderer,
const gltf2::Asset &  asset,
GltfLoader::LoadedAssets loadedAssets,
int32_t  index 
)
private

Definition at line 282 of file GltfLoader.cpp.

◆ createNode()

bool lug::Graphics::GltfLoader::createNode ( Renderer renderer,
const gltf2::Asset &  asset,
GltfLoader::LoadedAssets loadedAssets,
int32_t  index,
Scene::Node parent 
)
private

Definition at line 405 of file GltfLoader.cpp.


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