28 const std::size_t i = (edge->m_vertices[1] == m_vertex);
34 edge->m_vertex_next[i] = edge;
35 edge->m_vertex_previous[i] = edge;
40 const std::size_t j = (m_head->m_vertices[1] == m_vertex);
43 edge->m_vertex_next[i] = m_head;
44 edge->m_vertex_previous[i] = m_head->m_vertex_previous[j];
45 edge->m_vertex_previous[i]->m_vertex_next[edge->m_vertex_previous[i]->m_vertices[1] == m_vertex] = edge;
46 m_head->m_vertex_previous[j] = edge;
55 const std::size_t i = (edge->m_vertices[1] == m_vertex);
59 brep_edge* previous = edge->m_vertex_previous[i];
62 next->m_vertex_previous[next->m_vertices[1] == m_vertex] = previous;
63 previous->m_vertex_next[previous->m_vertices[1] == m_vertex] = next;
77 vertex->m_index =
size() - 1;
78 vertex->m_edges.m_vertex = vertex;
85 while (!vertex->edges().empty())
void erase(brep_edge *edge) override
Erases an edge and all dependent loops and faces.
Curve segment bounded by two vertices.
constexpr std::size_t size() const noexcept
Returns the number of elements in the container.
virtual void erase(element_type *element)
Erases an element from the container.
constexpr bool empty() const noexcept
Returns true if the container is empty, false otherwise.
constexpr element_type * back() const noexcept
Returns the last element.
virtual element_type * emplace_back()
Appends a new element to the end of the container.
const brep_edge_container & edges() const noexcept
Returns the mesh edges.
void erase(brep_vertex *vertex) override
Erases a vertex and all dependent edges, loops, and faces.
brep_vertex * emplace_back() override
Appends a new vertex to the end of the container.
void clear() noexcept
Erases all vertices and their dependent edges, loops, and faces.
void push_back(brep_edge *edge)
Appends an edge to the end of the list.
void remove(brep_edge *edge)
Removes an edge from the list.
constexpr bool empty() const noexcept
Returns true if the list is empty, false otherwise.