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

Native model file loader. The model file loaded has to have been produced by converting a file in a supported format to a small3d native binary file using the format converter program, s3dfc, produced by this project's build scripts, for example by running s3dfc car.glb car.bin (this would convert a car gltf (.glb) model file to a native binary model file) ATTENTION: Unfortunately the native binary files have issues across architectures. So for example binaries created on Windows do not work on Linux. They need to be created and tested separately for each. More...

#include <BinaryFile.hpp>

Inheritance diagram for small3d::BinaryFile:
small3d::File

Public Member Functions

 BinaryFile (const std::string &fileLocation)
 Constructor. More...
 
void load (Model &model, const std::string &meshName) override
 Load data from the Wavefront 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

Native model file loader. The model file loaded has to have been produced by converting a file in a supported format to a small3d native binary file using the format converter program, s3dfc, produced by this project's build scripts, for example by running s3dfc car.glb car.bin (this would convert a car gltf (.glb) model file to a native binary model file) ATTENTION: Unfortunately the native binary files have issues across architectures. So for example binaries created on Windows do not work on Linux. They need to be created and tested separately for each.

Constructor & Destructor Documentation

◆ BinaryFile()

BinaryFile::BinaryFile ( const std::string &  fileLocation)
explicit

Constructor.

Parameters
fileLocationPath to wavefront file

Member Function Documentation

◆ getMeshNames()

std::vector< std::string > BinaryFile::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 BinaryFile::load ( Model model,
const std::string &  meshName 
)
overridevirtual

Load data from the Wavefront file into a Model.

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

Implements small3d::File.


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