25 std::vector<std::vector<float> > vertices;
26 std::vector<std::vector<int> > facesVertexIndices;
27 std::vector<std::vector<float> > normals;
28 std::vector<std::vector<int> > facesNormalIndices;
29 std::vector<std::vector<float> > textureCoords;
30 std::vector<std::vector<int> > textureCoordsIndices;
32 void loadVertexData();
34 void loadNormalsData();
35 void loadTextureCoordsData();
41 void correctDataVectors();
132 Model(
const std::string fileLocation);
A 3D model, loaded from a Wavefront file.
Definition: Model.hpp:21
uint32_t normalsBufferObjectId
Normals buffer object id. It is suggested not to manipulate this directly.
Definition: Model.hpp:63
uint32_t positionBufferObjectId
Position buffer object id. It is suggested not to manipulate this directly.
Definition: Model.hpp:51
std::vector< float > vertexData
The vertex data. This is an array, which is to be treated as a 4 column table, holding the x,...
Definition: Model.hpp:76
std::vector< float > normalsData
Array, to be treated as a 3 column table. Each "row" contains the x, y and z components of the vector...
Definition: Model.hpp:101
int normalsDataByteSize
Size of the normals data, in bytes.
Definition: Model.hpp:106
std::vector< float > textureCoordsData
Array, to be treated as a 2 column table. Each "row" contains the x and y components of the pixel coo...
Definition: Model.hpp:114
uint32_t indexBufferObjectId
Index buffer object id. It is suggested not to manipulate this directly.
Definition: Model.hpp:57
uint32_t uvBufferObjectId
UV buffer object id. It is suggested not to manipulate this directly.
Definition: Model.hpp:69
int vertexDataByteSize
Size of the vertex data, in bytes.
Definition: Model.hpp:81
std::vector< unsigned int > indexData
3 column table. Each element refers to a "row" in the vertex data table. Each "row" in the index data...
Definition: Model.hpp:88
int indexDataByteSize
Size of the index data, in bytes.
Definition: Model.hpp:93
Model()
Default constructor.
Definition: Model.cpp:194
int textureCoordsDataByteSize
Size of the texture coordinates data, in bytes.
Definition: Model.hpp:119