Half-edge mesh.
More...
#include <mesh.hpp>
|
struct | edge |
| Half-edge mesh edge, containing its index and pointers to its starting vertex, parent face, and related edges. More...
|
|
struct | face |
| Half-edge mesh face, containing its index and a pointer to its first edge. More...
|
|
struct | vertex |
| Half-edge mesh vertex, containing its index, a pointer to its parent edge, and its position vector. More...
|
|
|
typedef std::vector< edge * > | loop |
| List of edges which form a face. More...
|
|
◆ loop
List of edges which form a face.
Definition at line 94 of file mesh.hpp.
◆ mesh() [1/2]
constexpr geom::mesh::mesh |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ mesh() [2/2]
geom::mesh::mesh |
( |
const mesh & |
other | ) |
|
Copy-constructs a mesh.
Definition at line 25 of file mesh.cpp.
◆ ~mesh()
Destructs a mesh.
Definition at line 30 of file mesh.cpp.
◆ add_edge()
Adds two half edges to the mesh.
- Parameters
-
a | Vertex from which the edge originates. |
b | Vertex at which the edge ends. |
- Returns
- Pointer to the half edge
ab
. The symmetric half edge ba
can be accessed through ab->symmetric
.
Definition at line 159 of file mesh.cpp.
◆ add_face()
Adds a face to the mesh.
- Parameters
-
loop | List of edges which form the face. |
- Returns
- Pointer to the added face.
- Exceptions
-
std::runtime_error | Empty edge loop. |
std::runtime_error | Disconnected edge loop. |
std::runtime_error | Non-manifold mesh 1. |
std::runtime_error | Non-manifold mesh 2. |
Definition at line 212 of file mesh.cpp.
◆ add_vertex()
Adds a vertex to the mesh.
- Parameters
-
position | Position of the vertex. |
- Returns
- Pointer to the added vertex.
- Warning
- The added vertex will initially have a null edge.
Definition at line 145 of file mesh.cpp.
◆ clear()
void geom::mesh::clear |
( |
| ) |
|
|
noexcept |
Removes all vertices, edges, and faces from the mesh.
Definition at line 123 of file mesh.cpp.
◆ get_edges()
const std::vector< mesh::edge * > & geom::mesh::get_edges |
( |
| ) |
const |
|
inline |
Returns the mesh edges.
Definition at line 204 of file mesh.hpp.
◆ get_faces()
const std::vector< mesh::face * > & geom::mesh::get_faces |
( |
| ) |
const |
|
inline |
Returns the mesh faces.
Definition at line 209 of file mesh.hpp.
◆ get_vertices()
const std::vector< mesh::vertex * > & geom::mesh::get_vertices |
( |
| ) |
const |
|
inline |
Returns the mesh vertices.
Definition at line 199 of file mesh.hpp.
◆ operator=()
mesh & geom::mesh::operator= |
( |
const mesh & |
other | ) |
|
Copies another mesh into this mesh.
- Parameters
-
- Returns
- Reference to this mesh.
Definition at line 35 of file mesh.cpp.
◆ remove_edge()
Removes an edge and all dependent faces from the mesh.
- Parameters
-
edge | Edge to be removed. This edge will be deallocated after removal. |
Definition at line 288 of file mesh.cpp.
◆ remove_face()
Removes a face from the mesh.
- Parameters
-
face | Face to be removed. This face will be deallocated after removal. |
Definition at line 264 of file mesh.cpp.
◆ remove_vertex()
Removes a vertex, all dependent edges, and all dependent faces from the mesh.
- Parameters
-
vertex | Vertex to be removed. This vertex will be deallocated after removal. |
Definition at line 330 of file mesh.cpp.
The documentation for this class was generated from the following files: