Brenta Engine 1.1
|
The Mesh class represents a 3D model. More...
#include <mesh.hpp>
Data Structures | |
class | builder |
The Builder class is used to build a Mesh object. More... | |
Public Member Functions | |
mesh (std::vector< types::vertex > vertices, std::vector< unsigned int > indices, std::vector< types::texture > textures, GLint wrapping=GL_REPEAT, GLint filtering_min=GL_NEAREST, GLint filtering_mag=GL_LINEAR, GLboolean hasMipmap=GL_TRUE, GLint mipmap_min=GL_LINEAR_MIPMAP_LINEAR, GLint mipmap_max=GL_LINEAR) | |
Construct a new Mesh object. | |
void | draw (types::shader_name_t shader_name) |
Draw the mesh. | |
Data Fields | |
std::vector< types::vertex > | vertices |
vertices of the mesh | |
std::vector< unsigned int > | indices |
indices of the mesh | |
std::vector< types::texture > | textures |
textures of the mesh | |
GLint | wrapping |
Type of texture wrapping. | |
GLint | filtering_min |
Minifying texture filtering. | |
GLint | filtering_mag |
Magnifying texture filtering. | |
GLboolean | has_mipmap |
Should the texture have a mipmap? | |
GLint | mipmap_min |
Type of mipmap minifying texture filtering. | |
GLint | mipmap_mag |
Type of mipmap magnifying texture filtering. | |
The Mesh class represents a 3D model.
A mesh is a collection of vertices, indices and textures that represent a 3D model. The mesh can be drawn using a shader and calling the Draw method.
mesh::mesh | ( | std::vector< types::vertex > | vertices, |
std::vector< unsigned int > | indices, | ||
std::vector< types::texture > | textures, | ||
GLint | wrapping = GL_REPEAT, | ||
GLint | filtering_min = GL_NEAREST, | ||
GLint | filtering_mag = GL_LINEAR, | ||
GLboolean | hasMipmap = GL_TRUE, | ||
GLint | mipmap_min = GL_LINEAR_MIPMAP_LINEAR, | ||
GLint | mipmap_max = GL_LINEAR ) |
Construct a new Mesh object.
vertices | Vertices of the mesh |
indices | Indices of the mesh |
textures | Textures of the mesh |
wrapping | Type of texture wrapping |
filtering_min | Minifying texture filtering |
filtering_mag | Magnifying texture filtering |
hasMipmap | Should the texture have a mipmap? |
mipmap_min | Type of mipmap minifying texture filtering |
mipmap_mag | Type of mipmap magnifying texture filtering |
void mesh::draw | ( | types::shader_name_t | shader_name | ) |
GLint brenta::mesh::filtering_mag |
GLint brenta::mesh::filtering_min |
GLboolean brenta::mesh::has_mipmap |
std::vector<unsigned int> brenta::mesh::indices |
GLint brenta::mesh::mipmap_mag |
Type of mipmap magnifying texture filtering.
Type of texture filtering used when magnifying (scaling up) a texture with mipmaps. Options are:
GLint brenta::mesh::mipmap_min |
Type of mipmap minifying texture filtering.
Type of texture filtering used when minifying (scaling down) a texture with mipmaps. Options are:
std::vector<types::texture> brenta::mesh::textures |
std::vector<types::vertex> brenta::mesh::vertices |
GLint brenta::mesh::wrapping |
Type of texture wrapping.
Options are: