Level H Engine
Namespaces | Macros | Functions
FileLoader.h File Reference
#include <string>
#include <vector>
#include <sstream>
Include dependency graph for FileLoader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 FileLoader
 A namespace that contains functions to load in files.
 

Macros

#define shaderFolder   "Assets/glsl/"
 
#define shaderExtension   ".glsl"
 
#define meshFolder   "Assets/obj/"
 
#define meshExtension   ".obj"
 

Functions

std::string FileLoader::loadShaderFile (std::string fileName)
 Load the contents of a text file in to a std::string. More...
 
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. More...
 
void FileLoader::loadXYZFloats (std::stringstream &streamLine, std::vector< float > &vectorArray)
 Load in the XYZ coordinate from the line. More...
 
void FileLoader::loadUVFloats (std::stringstream &streamLine, std::vector< float > &vectorArray)
 Load in the UV coordinate from the line. More...
 
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. More...
 

Macro Definition Documentation

◆ meshExtension

#define meshExtension   ".obj"

◆ meshFolder

#define meshFolder   "Assets/obj/"

◆ shaderExtension

#define shaderExtension   ".glsl"

◆ shaderFolder

#define shaderFolder   "Assets/glsl/"