Singleton class for model loading. ATM only .obj meshes can be parsed. More...
#include <GModelLoader.h>
Public Member Functions | |
GMesh * | LoadMesh (std::string filename) |
load a mesh from file (source-type: obj), allocate memory, setup mesh and resturn pointer | |
vector< std::string > | LoadHierarchy (std::string filename) |
load a mesh hierarchy (i.e. a list of submeshes to make up a mesh). Note: only the filenames are returned here, run LoadMesh() on every file. | |
vector< vertexmapper_t > | LoadVertexMapping (std::string filename) |
load the vertex/bone mapping for a mesh | |
Protected Member Functions | |
int | parseface (char str[256], GMesh *Mesh, int mat) |
parse a geometry face (.obj) | |
int | parsematerial (std::string filename, GMesh *Mesh) |
parse a material (.mtl) | |
int | mapmaterial (std::string str, GMesh *Mesh) |
acquire a material for a name | |
int | setupMaterials (std::string filename, GMesh *Mesh) |
setup all materials from an .mtl file |
Singleton class for model loading. ATM only .obj meshes can be parsed.
vector< std::string > GModelLoader::LoadHierarchy | ( | std::string | filename | ) |
load a mesh hierarchy (i.e. a list of submeshes to make up a mesh). Note: only the filenames are returned here, run LoadMesh() on every file.
GMesh * GModelLoader::LoadMesh | ( | std::string | filename | ) |
load a mesh from file (source-type: obj), allocate memory, setup mesh and resturn pointer
vector< vertexmapper_t > GModelLoader::LoadVertexMapping | ( | std::string | filename | ) |
load the vertex/bone mapping for a mesh
int GModelLoader::mapmaterial | ( | std::string | str, | |
GMesh * | Mesh | |||
) | [protected] |
acquire a material for a name
int GModelLoader::parseface | ( | char | str[256], | |
GMesh * | Mesh, | |||
int | mat | |||
) | [protected] |
parse a geometry face (.obj)
int GModelLoader::parsematerial | ( | std::string | filename, | |
GMesh * | Mesh | |||
) | [protected] |
parse a material (.mtl)
int GModelLoader::setupMaterials | ( | std::string | filename, | |
GMesh * | Mesh | |||
) | [protected] |
setup all materials from an .mtl file