A namespace that contains functions to load in files.
More...
|
std::string | loadShaderFile (std::string fileName) |
| Load the contents of a text file in to a std::string. More...
|
|
void | loadOBJFile (std::string objFileName, std::vector< float > &vertices, std::vector< float > &vertexNormals, std::vector< float > &vertexTextures) |
| Load the contents of an obj file. NOTE: This can only load in triangulated meshes. More...
|
|
void | loadXYZFloats (std::stringstream &streamLine, std::vector< float > &vectorArray) |
| Load in the XYZ coordinate from the line. More...
|
|
void | loadUVFloats (std::stringstream &streamLine, std::vector< float > &vectorArray) |
| Load in the UV coordinate from the line. More...
|
|
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) |
| Sort the data using the indices of the faces to order the data. More...
|
|
A namespace that contains functions to load in files.
◆ loadOBJFile()
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. NOTE: This can only load in triangulated meshes.
- Parameters
-
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. |
◆ loadShaderFile()
std::string FileLoader::loadShaderFile |
( |
std::string |
fileName | ) |
|
Load the contents of a text file in to a std::string.
- Parameters
-
- Returns
- The contents of the file in a single std::string.
◆ loadUVFloats()
void FileLoader::loadUVFloats |
( |
std::stringstream & |
streamLine, |
|
|
std::vector< float > & |
vectorArray |
|
) |
| |
Load in the UV coordinate from the line.
- Parameters
-
streamLine | The current stringstream. |
vectorArray | The vector array to push to. |
◆ loadXYZFloats()
void FileLoader::loadXYZFloats |
( |
std::stringstream & |
streamLine, |
|
|
std::vector< float > & |
vectorArray |
|
) |
| |
Load in the XYZ coordinate from the line.
- Parameters
-
streamLine | The current stringstream. |
vectorArray | The vector array to push to. |
◆ sortWithIndices()
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.
- Parameters
-
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. |