The small3d library
Classes | Public Member Functions | List of all members
small3d::GlbFile Class Reference

.glb (glTF) file parser class. It can load meshes, textures and linear animations from samplers with a common input (the rest are ignored). More...

#include <GlbFile.hpp>

Inheritance diagram for small3d::GlbFile:
small3d::File

Public Member Functions

 GlbFile (const std::string &fileLocation)
 Constructor of the GlbFile class. More...
 
void printTokensRecursive ()
 Recursively print all tokens, starting from the head of the first token queue, dereferencing queue references.
 
void printTokensSerial ()
 Print tokens as found in the token queues, without dereferencing queue references.
 
void load (Model &model, const std::string &meshName="") override
 Load a mesh from the file into a Model. More...
 
std::vector< std::string > getMeshNames () override
 Get a list of the names of the meshes contained in the file. More...
 
- Public Member Functions inherited from small3d::File
 File (const std::string &fileLocation)
 Constructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from small3d::File
std::string fullPath = ""
 The path to the file being parsed.
 

Detailed Description

.glb (glTF) file parser class. It can load meshes, textures and linear animations from samplers with a common input (the rest are ignored).

Constructor & Destructor Documentation

◆ GlbFile()

small3d::GlbFile::GlbFile ( const std::string &  fileLocation)
explicit

Constructor of the GlbFile class.

Parameters
fileLocationThe name and path of the GLB file to be parsed

Member Function Documentation

◆ getMeshNames()

std::vector< std::string > small3d::GlbFile::getMeshNames ( )
overridevirtual

Get a list of the names of the meshes contained in the file.

Returns
The list of mesh names

Implements small3d::File.

◆ load()

void small3d::GlbFile::load ( Model model,
const std::string &  meshName = "" 
)
overridevirtual

Load a mesh from the file into a Model.

Parameters
modelThe Model into which to load the data
meshNameThe name of the mesh to load

Implements small3d::File.


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