Creates an object from an text file, this can then be used with OpenGL.
More...
#include <Mesh.h>
Creates an object from an text file, this can then be used with OpenGL.
◆ Mesh() [1/5]
Mesh::Mesh |
( |
std::string |
objFileName | ) |
|
Creates a vertex array object using a obj file location and OpenGL.
- Parameters
-
objFileName | The name of the obj file. |
◆ Mesh() [2/5]
Creates a vertex array object using a primitive type.
- Parameters
-
primType | The primitive type. |
◆ Mesh() [3/5]
Mesh::Mesh |
( |
std::string |
fileName, |
|
|
bool |
heightmap |
|
) |
| |
Creates a vertex array object using a file location and OpenGL.
- Parameters
-
fileName | The name of the file. |
heightmap | A boolean stating if it is a heightmap. |
◆ Mesh() [4/5]
Mesh::Mesh |
( |
std::string |
objFileName, |
|
|
std::string |
textureFileName |
|
) |
| |
Creates a vertex array object using a obj file location and OpenGL.
- Parameters
-
objFileName | The name of the obj file. |
textureFileName | The name of the texture file. |
◆ Mesh() [5/5]
Mesh::Mesh |
( |
std::string |
fileName, |
|
|
std::string |
textureFileName, |
|
|
bool |
heightmap |
|
) |
| |
Creates a vertex array object using a file location and OpenGL.
- Parameters
-
fileName | The name of the file. |
textureFileName | The name of the texture file. |
heightmap | A boolean stating if it is a heightmap. |
◆ ~Mesh()
◆ calculateMaxAndMinVerticies()
void Mesh::calculateMaxAndMinVerticies |
( |
std::vector< float > & |
vertices | ) |
|
|
private |
Calculated the maximum and minimum indices.
- Parameters
-
vertices | A reference to the vertices vector. |
◆ checkHeightmap()
bool Mesh::checkHeightmap |
( |
| ) |
|
|
inline |
Checks if it is heightmap.
- Returns
- The heightmap bool.
◆ checkPrimitive()
bool Mesh::checkPrimitive |
( |
| ) |
|
|
inline |
Checks if it is primative.
- Returns
- The primative bool.
◆ getMaxVert()
Vec3 Mesh::getMaxVert |
( |
| ) |
|
|
inline |
Returns the max vertices.
- Returns
- The max vertices.
◆ getMinVert()
Vec3 Mesh::getMinVert |
( |
| ) |
|
|
inline |
Returns the min vertices.
- Returns
- The min vertices.
◆ getNumberOfVertices()
unsigned int Mesh::getNumberOfVertices |
( |
| ) |
|
Returns the number of vertices.
- Returns
- The number of vertices.
◆ getNumIndices()
unsigned int Mesh::getNumIndices |
( |
| ) |
|
|
inline |
Returns the number of indices.
- Returns
- The number of indices.
◆ getTextureID()
GLuint Mesh::getTextureID |
( |
| ) |
|
Returns the Texture ID.
- Returns
- The texture ID.
◆ getVAO()
Returns the vertex array object.
- Returns
- The vertex array object.
◆ initaliseIndicies()
GLuint Mesh::initaliseIndicies |
( |
std::vector< unsigned int > & |
inIndices | ) |
|
|
private |
Initialise indices.
- Parameters
-
inIndices | A reference to the indices vector. |
- Returns
- The indices.
◆ initaliseVBO()
GLuint Mesh::initaliseVBO |
( |
unsigned int |
vecNum, |
|
|
std::vector< float > & |
inVBOData, |
|
|
int |
linkNum |
|
) |
| |
|
private |
Initialise a vertex array object.
- Parameters
-
vecNum | The vector num. |
inVBOData | A refrence to the VBO data vector. |
linkNum | The link number. |
- Returns
- The vertex array object.
◆ initialiseTexture()
void Mesh::initialiseTexture |
( |
std::vector< float > |
vertexTextures | ) |
|
|
private |
Initialise the texture.
- Parameters
-
vertexTextures | The vertex textures vector. |
◆ initialiseVAO()
void Mesh::initialiseVAO |
( |
std::string |
fileName | ) |
|
|
private |
Initialise the vertex array object.
- Parameters
-
fileName | The name of the file. |
◆ heightmap
If the mesh if is a heightmap.
◆ indexBuffer
◆ maxVert
◆ minVert
◆ numberOfIndices
unsigned int Mesh::numberOfIndices |
|
private |
◆ numberOfVertices
unsigned int Mesh::numberOfVertices |
|
private |
Number of vertices in the model.
◆ primative
If the mesh is a primitive.
◆ textureBuffer
GLuint Mesh::textureBuffer |
|
private |
◆ textureFileName
std::string Mesh::textureFileName |
|
private |
The name of the texture file.
◆ textureID
◆ vertexArrayObject
GLuint Mesh::vertexArrayObject |
|
private |
The Vertex Array Object for use with OpenGL.
The documentation for this class was generated from the following files:
- LevelHEngine/ResourceManagement/Mesh.h
- LevelHEngine/ResourceManagement/Mesh.cpp