20 #ifndef ANTKEEPER_GEOM_MESH_HPP
21 #define ANTKEEPER_GEOM_MESH_HPP
94 typedef std::vector<edge*>
loop;
99 constexpr
mesh() noexcept = default;
123 void clear() noexcept;
void remove_vertex(mesh::vertex *vertex)
Removes a vertex, all dependent edges, and all dependent faces from the mesh.
const std::vector< mesh::edge * > & get_edges() const
Returns the mesh edges.
void remove_face(mesh::face *face)
Removes a face from the mesh.
mesh::face * add_face(const loop &loop)
Adds a face to the mesh.
const std::vector< mesh::face * > & get_faces() const
Returns the mesh faces.
mesh::vertex * add_vertex(const float3 &position)
Adds a vertex to the mesh.
void clear() noexcept
Removes all vertices, edges, and faces from the mesh.
std::vector< edge * > loop
List of edges which form a face.
constexpr mesh() noexcept=default
Constructs a mesh.
mesh::edge * add_edge(mesh::vertex *a, mesh::vertex *b)
Adds two half edges to the mesh.
const std::vector< mesh::vertex * > & get_vertices() const
Returns the mesh vertices.
void remove_edge(mesh::edge *edge)
Removes an edge and all dependent faces from the mesh.
@ position
Vertex position (vec3)
Half-edge mesh edge, containing its index and pointers to its starting vertex, parent face,...
mesh::face * face
Pointer to the face on the left of this edge.
std::size_t index
Index of this edge.
mesh::edge * next
Pointer to the next edge in the parent face.
mesh::vertex * vertex
Pointer to the vertex at which the edge starts.
mesh::edge * symmetric
Pointer to the symmetric edge.
mesh::edge * previous
Pointer to the previous edge in the parent face.
Half-edge mesh face, containing its index and a pointer to its first edge.
mesh::edge * edge
Pointer to the first edge in this face.
std::size_t index
Index of this face.
Half-edge mesh vertex, containing its index, a pointer to its parent edge, and its position vector.
float3 position
Vertex position.
mesh::edge * edge
Pointer to the edge to which this vertex belongs.
std::size_t index
Index of this vertex.