#include <obj_loader.hpp>
Public Member Functions | |
OBJ_FileLoader () | |
Constructor. | |
OBJ_FileLoader (const char *fname) | |
Constructor. | |
~OBJ_FileLoader () | |
Destructor. | |
int | GetNMeshes () const |
Get the number of meshes found in the file. | |
OBJ_Mesh const * | GetMesh (int index) const |
Get a Mesh from the file. | |
void | AddMesh (OBJ_Mesh const &mesh) |
Add a mesh to the meshlist. | |
void | WriteFile (char const *fname) const |
Write data back to a file. |
OBJ_FileLoader::OBJ_FileLoader | ( | const char * | fname | ) |
Constructor.
[in] | fname | Full path to the file that shall be loaded |
std::bad_alloc |
int OBJ_FileLoader::GetNMeshes | ( | ) | const |
Get the number of meshes found in the file.
OBJ_Mesh const * OBJ_FileLoader::GetMesh | ( | int | index | ) | const |
Get a Mesh from the file.
[in] | index | Number of the mesh from range [0..( GetNMeshes() - 1 )] |
void OBJ_FileLoader::AddMesh | ( | OBJ_Mesh const & | mesh | ) |
Add a mesh to the meshlist.
[in] | mesh | The mesh to add |
std::bad_alloc |
void OBJ_FileLoader::WriteFile | ( | char const * | fname | ) | const |
Write data back to a file.
[in] | fname | Full path to the output file |
Ghulbus::gbException | GB_FAILED indicates a file access error |