|
Clutter Engine 0.0.1
|
Class representing a 3D mesh with associated textures and shaders. More...
#include <Mesh.h>
Public Member Functions | |
| Mesh () | |
| Default constructor. | |
| Mesh (const float *pVertices, u32 pVerticeCount, bool tesselate) | |
| Constructs a mesh from a raw vertex array. | |
| Mesh (const float *pVertices, u32 pVerticeCount, ShaderProgram *pShader, bool isTesselated) | |
| Constructs a mesh from a raw vertex array and a shader. | |
| Mesh (std::vector< Vertex > pVertices, ShaderProgram *pShader, bool isTesselated) | |
| Constructs a mesh from a vector of vertices and a shader. | |
| Mesh (std::vector< Vertex > pVertices, bool tesselate) | |
| Constructs a mesh from a vector of vertices. | |
| ~Mesh ()=default | |
| Destructor. | |
| void | Unload () |
| Unloads the mesh and releases resources. | |
| Texture * | GetTexture (int pTextureIndex) |
| Gets a texture by index. | |
| bool | HasTexture (Texture *pTextureIndex) |
| Checks if the mesh has a specific texture. | |
| VertexArray & | GetVAO () |
| Gets the mesh's Vertex Array Object. | |
| ShaderProgram & | GetShader () |
| Gets the mesh's shader program. | |
| void | AddTexture (Texture *pTexture) |
| Adds a texture to the mesh. | |
| void | SetTexture (Texture *texture, size_t &index) |
| Sets a texture at a specific index. | |
| void | SetTexture (std::string &texture, size_t &index) |
| Sets a texture by name at a specific index. | |
| void | SetTextureTiling (Vector2 tiling) |
| Sets the tiling factor for the mesh's textures. | |
| Vector2 | GetTextureTiling () const |
| Gets the tiling factor for the mesh's textures. | |
| bool | GetTesselated () const |
| Checks if tessellation is enabled for the mesh. | |
| void | SetMesh (VertexArray *pVAO) |
| Sets the mesh's Vertex Array Object. | |
| void | SetMesh (const float *pVertices, u32 pVerticeCount, const u32 *pIndices, u32 pIndexCount) |
| Sets the mesh data from raw vertex and index arrays. | |
Class representing a 3D mesh with associated textures and shaders.
| Mesh::Mesh | ( | const float * | pVertices, |
| u32 | pVerticeCount, | ||
| bool | tesselate ) |
Constructs a mesh from a raw vertex array.
| pVertices | Pointer to the vertex data. |
| pVerticeCount | Number of vertices. |
| tesselate | Whether tessellation is enabled. |
| Mesh::Mesh | ( | const float * | pVertices, |
| u32 | pVerticeCount, | ||
| ShaderProgram * | pShader, | ||
| bool | isTesselated ) |
Constructs a mesh from a raw vertex array and a shader.
| pVertices | Pointer to the vertex data. |
| pVerticeCount | Number of vertices. |
| pShader | Pointer to the shader program. |
| isTesselated | Whether tessellation is enabled. |
| Mesh::Mesh | ( | std::vector< Vertex > | pVertices, |
| ShaderProgram * | pShader, | ||
| bool | isTesselated ) |
Constructs a mesh from a vector of vertices and a shader.
| pVertices | Vector of vertices. |
| pShader | Pointer to the shader program. |
| isTesselated | Whether tessellation is enabled. |
| Mesh::Mesh | ( | std::vector< Vertex > | pVertices, |
| bool | tesselate ) |
Constructs a mesh from a vector of vertices.
| pVertices | Vector of vertices. |
| tesselate | Whether tessellation is enabled. |
| void Mesh::AddTexture | ( | Texture * | pTexture | ) |
Adds a texture to the mesh.
| pTexture | Pointer to the texture to add. |
|
inline |
Gets the mesh's shader program.
|
inline |
Checks if tessellation is enabled for the mesh.
| Texture * Mesh::GetTexture | ( | int | pTextureIndex | ) |
Gets a texture by index.
| pTextureIndex | Index of the texture. |
|
inline |
Gets the tiling factor for the mesh's textures.
|
inline |
Gets the mesh's Vertex Array Object.
|
inline |
Checks if the mesh has a specific texture.
| pTextureIndex | Pointer to the texture to check. |
| void Mesh::SetMesh | ( | const float * | pVertices, |
| u32 | pVerticeCount, | ||
| const u32 * | pIndices, | ||
| u32 | pIndexCount ) |
Sets the mesh data from raw vertex and index arrays.
| pVertices | Pointer to the vertex data. |
| pVerticeCount | Number of vertices. |
| pIndices | Pointer to the index data. |
| pIndexCount | Number of indices. |
| void Mesh::SetMesh | ( | VertexArray * | pVAO | ) |
Sets the mesh's Vertex Array Object.
| pVAO | Pointer to the VertexArray. |
| void Mesh::SetTexture | ( | std::string & | texture, |
| size_t & | index ) |
Sets a texture by name at a specific index.
| texture | Name of the texture. |
| index | Index to set the texture at. |
| void Mesh::SetTexture | ( | Texture * | texture, |
| size_t & | index ) |
Sets a texture at a specific index.
| texture | Pointer to the texture. |
| index | Index to set the texture at. |
|
inline |
Sets the tiling factor for the mesh's textures.
| tiling | The tiling factor. |