Class Argos::Mesh
Core mesh representation storing vertices and polygonal faces. More...
#include <Mesh.h>
Public Functions
| Type | Name |
|---|---|
| Mesh () = default Default constructor — creates an empty mesh. |
|
| Mesh (const std::vector< Vector3D< double > > & vertices, const std::vector< Face > & faces) Construct a mesh from vertex positions and faces. |
|
| Mesh (const Mesh & other) Copy constructor. |
|
| int | faceCount () const Number of faces in the mesh. |
| std::vector< Vertex > | getFace (int i) const Get the vertices of a face by index. |
| const std::vector< Face > & | getFaces () const Const access to all faces. |
| std::vector< Face > & | getFaces () Mutable access to all faces. |
| Vertex | getVertex (int i) const Get a vertex by index. |
| const std::vector< Vector3D< double > > & | getVertices () const Const access to all vertex positions. |
| std::vector< Vector3D< double > > & | getVertices () Mutable access to all vertex positions. |
| bool | isEmpty () const Whether the mesh is empty. |
| int | vertexCount () const Number of vertices in the mesh. |
Detailed Description
A Mesh holds a list of 3D vertex positions and a list of Face objects that reference vertices by index. Faces may be triangles, quads, or arbitrary polygons.
Public Functions Documentation
function Mesh [1/3]
Default constructor — creates an empty mesh.
function Mesh [2/3]
Construct a mesh from vertex positions and faces.
Argos::Mesh::Mesh (
const std::vector< Vector3D < double > > & vertices,
const std::vector< Face > & faces
)
Parameters:
verticesThe 3D vertex coordinates.facesThe polygonal faces referencing vertex indices.
function Mesh [3/3]
Copy constructor.
Parameters:
otherMesh to copy.
function faceCount
Number of faces in the mesh.
Returns:
Face count.
function getFace
Get the vertices of a face by index.
Parameters:
iFace index (0-based).
Returns:
Vector of Vertex objects forming the face.
function getFaces [1/2]
Const access to all faces.
Returns:
Const reference to the face vector.
function getFaces [2/2]
Mutable access to all faces.
Returns:
Mutable reference to the face vector.
function getVertex
Get a vertex by index.
Parameters:
iVertex index (0-based).
Returns:
A Vertex object wrapping the position at index i.
function getVertices [1/2]
Const access to all vertex positions.
Returns:
Const reference to the vertex vector.
function getVertices [2/2]
Mutable access to all vertex positions.
Returns:
Mutable reference to the vertex vector.
function isEmpty
Whether the mesh is empty.
Returns:
true if the mesh has no vertices and no faces.
function vertexCount
Number of vertices in the mesh.
Returns:
Vertex count.
The documentation for this class was generated from the following file include/mesh/Mesh.h