6 #include "../Maths/Vec3.h" 19 Mesh(std::string objFileName);
47 Mesh(std::string fileName, std::string textureFileName,
bool heightmap);
154 GLuint
initaliseVBO(
unsigned int vecNum, std::vector<float> &inVBOData,
int linkNum);
Vec3 minVert
The Min Verticies.
Definition: Mesh.h:122
GLuint vertexArrayObject
The Vertex Array Object for use with OpenGL.
Definition: Mesh.h:106
Mesh(std::string objFileName)
Creates a vertex array object using a obj file location and OpenGL.
Definition: Mesh.cpp:46
Creates an object from an text file, this can then be used with OpenGL.
Definition: Mesh.h:11
std::string textureFileName
The name of the texture file.
Definition: Mesh.h:116
bool checkPrimitive()
Checks if it is primative.
Definition: Mesh.h:102
unsigned int numberOfIndices
Definition: Mesh.h:114
GLuint getVAO()
Returns the vertex array object.
Definition: Mesh.cpp:204
void initialiseVAO(std::string fileName)
Initialise the vertex array object.
Definition: Mesh.cpp:102
~Mesh()
Destructs an Object.
Definition: Mesh.cpp:82
Vec3 getMaxVert()
Returns the max vertices.
Definition: Mesh.h:76
GLuint initaliseVBO(unsigned int vecNum, std::vector< float > &inVBOData, int linkNum)
Initialise a vertex array object.
Definition: Mesh.cpp:232
GLuint textureID
The Texture.
Definition: Mesh.h:118
GLuint getTextureID()
Returns the Texture ID.
Definition: Mesh.cpp:210
GLuint indexBuffer
The index buffer.
Definition: Mesh.h:108
bool checkHeightmap()
Checks if it is heightmap.
Definition: Mesh.h:96
unsigned int numberOfVertices
Number of vertices in the model.
Definition: Mesh.h:113
Contains the Vec3 structure with functions and overloaded operators.
Definition: Vec3.h:8
unsigned int getNumIndices()
Returns the number of indices.
Definition: Mesh.h:88
PrimativeType
Definition: Primitives.h:13
bool primative
If the mesh is a primitive.
Definition: Mesh.h:126
GLuint initaliseIndicies(std::vector< unsigned int > &inIndices)
Initialise indices.
Definition: Mesh.cpp:222
GLuint textureBuffer
The texture buffer.
Definition: Mesh.h:110
void calculateMaxAndMinVerticies(std::vector< float > &vertices)
Calculated the maximum and minimum indices.
Definition: Mesh.cpp:250
unsigned int getNumberOfVertices()
Returns the number of vertices.
Definition: Mesh.cpp:216
void initialiseTexture(std::vector< float > vertexTextures)
Initialise the texture.
Definition: Mesh.cpp:160
bool heightmap
If the mesh if is a heightmap.
Definition: Mesh.h:124
Vec3 maxVert
The Max Verticies.
Definition: Mesh.h:120
Vec3 getMinVert()
Returns the min vertices.
Definition: Mesh.h:82