A namespace that contains functions to load in files. More...
Functions | |
| std::string | loadShaderFile (std::string fileName) |
| void | loadOBJFile (std::string objFileName, std::vector< float > &vertices, std::vector< float > &vertexNormals, std::vector< float > &vertexTextures) |
| void | loadXYZFloats (std::stringstream &streamLine, std::vector< float > &vectorArray) |
| void | loadUVFloats (std::stringstream &streamLine, std::vector< float > &vectorArray) |
| void | sortWithIndices (std::stringstream &streamLine, std::vector< float > &loadedVertices, std::vector< float > &loadedVertexNormals, std::vector< float > &loadedVertexTextures, std::vector< float > &vertices, std::vector< float > &vertexNormals, std::vector< float > &vertexTextures) |
A namespace that contains functions to load in files.
| void FileLoader::loadOBJFile | ( | std::string | objFileName, |
| std::vector< float > & | vertices, | ||
| std::vector< float > & | vertexNormals, | ||
| std::vector< float > & | vertexTextures | ||
| ) |
Load the contents of an obj file.
| objFileName | The name of the obj file. |
| vertices | The vertices vector array to push to. |
| vertexNormals | The vertex normals vector array to push to. |
| vertexTextures | The vertex texture vector array to push to. |


| std::string FileLoader::loadShaderFile | ( | std::string | fileName | ) |
Load the contents of a text file in to a std::string.
| fileName | The file name. |

| void FileLoader::loadUVFloats | ( | std::stringstream & | streamLine, |
| std::vector< float > & | vectorArray | ||
| ) |
Load in the UV coordinate from the line.
| streamLine | The current stringstream. |
| vectorArray | The vector array to push to. |

| void FileLoader::loadXYZFloats | ( | std::stringstream & | streamLine, |
| std::vector< float > & | vectorArray | ||
| ) |
Load in the XYZ coordinate from the line.
| streamLine | The current stringstream. |
| vectorArray | The vector array to push to. |

| void FileLoader::sortWithIndices | ( | std::stringstream & | streamLine, |
| std::vector< float > & | loadedVertices, | ||
| std::vector< float > & | loadedVertexNormals, | ||
| std::vector< float > & | loadedVertexTextures, | ||
| std::vector< float > & | vertices, | ||
| std::vector< float > & | vertexNormals, | ||
| std::vector< float > & | vertexTextures | ||
| ) |
Sort the data using the indices of the faces to order the data.
| streamLine | The current stringstream. |
| loadedVertices | The vector array of the loaded vertices. |
| loadedVertexNormals | The vector array of the loaded vertex normals. |
| loadedVertexTextures | The vector array of the loaded vertex textures. |
| vertices | The vertices vector array to push to. |
| vertexNormals | The vertex normals vector array to push to. |
| vertexTextures | The vertex textures vector array to push to. |

1.8.8