The Mesh class represents a 3D mesh used for rendering in a graphics application.
More...
#include <headers/utility/graphic/mesh.hpp>
|
| | Mesh (const std::vector< VertexF > &vertices, const std::vector< uint32_t > &indices) |
| | Constructs a Mesh object with the specified vertices and indices.
|
| |
| | ~Mesh () |
| | Destructs the Mesh object, releasing any allocated resources.
|
| |
| void | addVertex (const VertexF &vertex) |
| | Add a vertex to the mesh.
|
| |
| void | addIndex (uint32_t index) |
| | Add an index to the mesh.
|
| |
| const std::vector< VertexF > & | getVertices () const |
| | Get the vertices of the mesh.
|
| |
| const std::vector< uint32_t > & | getIndices () const |
| | Get the indices of the mesh.
|
| |
| void | reset (void) |
| | Reset the mesh by clearing all vertices and indices.
|
| |
| bool | operator== (const Mesh &other) const |
| | Equality comparison.
|
| |
| bool | operator!= (const Mesh &other) const |
| | Inequality comparison.
|
| |
The Mesh class represents a 3D mesh used for rendering in a graphics application.
The Mesh class encapsulates the vertex and index data required to render a 3D object. It provides methods to add vertices and indices, as well as retrieve the current vertex and index data. The Mesh class is designed to be used in conjunction with rendering systems that require vertex and index buffers for efficient rendering of 3D geometry.
Definition at line 24 of file mesh.hpp.
◆ Mesh()
| utility::graphic::Mesh::Mesh |
( |
const std::vector< VertexF > & |
vertices, |
|
|
const std::vector< uint32_t > & |
indices |
|
) |
| |
Constructs a Mesh object with the specified vertices and indices.
- Parameters
-
| vertices | A vector of VertexF objects representing the vertices of the mesh. |
| indices | A vector of uint32_t values representing the indices for indexed drawing of the mesh. |
Definition at line 12 of file mesh.cpp.
◆ ~Mesh()
| utility::graphic::Mesh::~Mesh |
( |
| ) |
|
Destructs the Mesh object, releasing any allocated resources.
Definition at line 19 of file mesh.cpp.
◆ addIndex()
| void utility::graphic::Mesh::addIndex |
( |
uint32_t |
index | ) |
|
Add an index to the mesh.
- Parameters
-
| index | The uint32_t value representing the index to be added to the mesh. |
This method appends the provided index to the internal index list of the mesh, enabling indexed drawing of the mesh geometry.
Definition at line 28 of file mesh.cpp.
◆ addVertex()
| void utility::graphic::Mesh::addVertex |
( |
const VertexF & |
vertex | ) |
|
Add a vertex to the mesh.
- Parameters
-
| vertex | The VertexF object representing the vertex to be added to the mesh. |
This method appends the provided vertex to the internal vertex list of the mesh, allowing for dynamic construction of the mesh geometry.
Definition at line 23 of file mesh.cpp.
◆ getIndices()
| const std::vector< uint32_t > & utility::graphic::Mesh::getIndices |
( |
| ) |
const |
Get the indices of the mesh.
- Returns
- A const reference to a vector of uint32_t values representing the indices of the mesh.
This method allows retrieval of the current index data of the mesh, which can be used for indexed drawing or further processing.
Definition at line 38 of file mesh.cpp.
◆ getVertices()
| const std::vector< VertexF > & utility::graphic::Mesh::getVertices |
( |
| ) |
const |
Get the vertices of the mesh.
- Returns
- A const reference to a vector of VertexF objects representing the vertices of the mesh.
This method allows retrieval of the current vertex data of the mesh, which can be used for rendering or further processing.
Definition at line 33 of file mesh.cpp.
◆ operator!=()
| bool utility::graphic::Mesh::operator!= |
( |
const Mesh & |
other | ) |
const |
|
inline |
Inequality comparison.
- Parameters
-
| other | Mesh object to compare with. |
- Returns
- True when vertices or indices differ.
Definition at line 112 of file mesh.hpp.
◆ operator==()
| bool utility::graphic::Mesh::operator== |
( |
const Mesh & |
other | ) |
const |
|
inline |
Equality comparison.
- Parameters
-
| other | Mesh object to compare with. |
- Returns
- True when vertices and indices are equal.
Definition at line 102 of file mesh.hpp.
◆ reset()
| void utility::graphic::Mesh::reset |
( |
void |
| ) |
|
Reset the mesh by clearing all vertices and indices.
This method removes all vertex and index data from the mesh, effectively resetting it to an empty state. This can be useful for reusing a Mesh object without needing to create a new instance.
Definition at line 43 of file mesh.cpp.
The documentation for this class was generated from the following files: