The small3d library
Public Member Functions | Protected Attributes | List of all members
small3d::File Class Referenceabstract

Abstract file parser class. More...

#include <File.hpp>

Inheritance diagram for small3d::File:
small3d::BinaryFile small3d::GlbFile small3d::WavefrontFile

Public Member Functions

 File (const std::string &fileLocation)
 Constructor. More...
 
virtual void load (Model &model, const std::string &meshName)=0
 Load data from the file into a Model. More...
 
virtual std::vector< std::string > getMeshNames ()=0
 Get a list of the names of the meshes contained in the file. More...
 

Protected Attributes

std::string fullPath = ""
 The path to the file being parsed.
 

Detailed Description

Abstract file parser class.

Constructor & Destructor Documentation

◆ File()

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

Constructor.

Parameters
fileLocationPath to the file

Member Function Documentation

◆ getMeshNames()

virtual std::vector<std::string> small3d::File::getMeshNames ( )
pure virtual

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

Returns
The list of mesh names

Implemented in small3d::WavefrontFile, small3d::GlbFile, and small3d::BinaryFile.

◆ load()

virtual void small3d::File::load ( Model model,
const std::string &  meshName 
)
pure virtual

Load data from the file into a Model.

Parameters
modelThe model to load the data to
meshNameThe name of the mesh to load

Implemented in small3d::GlbFile, small3d::WavefrontFile, and small3d::BinaryFile.


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