20 #ifndef ANTKEEPER_GEOM_BREP_EDGE_HPP
21 #define ANTKEEPER_GEOM_BREP_EDGE_HPP
34 class brep_element_container;
69 m_loop = m_loop->m_edge_next;
83 m_loop = m_loop->m_edge_previous;
97 return m_position == other.m_position;
102 return m_position <=> other.m_position;
107 return m_position - rhs.m_position;
112 std::ptrdiff_t m_position;
129 return m_head->m_edge_previous;
158 it.m_position =
static_cast<std::ptrdiff_t
>(m_size);
172 return std::make_reverse_iterator(
end());
184 return std::make_reverse_iterator(
begin());
197 [[nodiscard]]
inline constexpr
bool empty() const noexcept
203 [[nodiscard]]
inline constexpr std::size_t
size() const noexcept
230 std::size_t m_size{};
250 [[nodiscard]]
inline constexpr std::size_t
index() const noexcept
256 [[nodiscard]]
inline constexpr
const std::array<brep_vertex*, 2>&
vertices() const noexcept
269 std::array<brep_vertex*, 2> m_vertices;
270 std::array<brep_edge*, 2> m_vertex_next;
271 std::array<brep_edge*, 2> m_vertex_previous;
303 void clear() noexcept;
void erase(brep_edge *edge) override
Erases an edge and all dependent loops and faces.
void clear() noexcept
Erases all edges and their dependent loops and faces.
brep_edge * find(brep_vertex *a, brep_vertex *b) const
Finds an edge bounded by vertices a and b (in any order).
List of B-rep loops that share a common edge.
constexpr const_iterator cend() const noexcept
Returns an iterator to the loop following the last loop.
constexpr bool empty() const noexcept
Returns true if the list is empty, false otherwise.
brep_loop * front() const noexcept
Returns the first loop.
void push_back(brep_loop *loop)
Appends a loop to the end of the list.
void remove(brep_loop *loop)
Removes an loop from the list.
constexpr const_iterator end() const noexcept
Returns an iterator to the loop following the last loop.
std::reverse_iterator< const_iterator > const_reverse_iterator
constexpr const_reverse_iterator rbegin() const noexcept
Returns a reverse iterator to the first loop of the reversed list.
constexpr const_iterator begin() const noexcept
Returns an iterator to the first loop.
constexpr const_iterator cbegin() const noexcept
Returns an iterator to the first loop.
constexpr const_reverse_iterator crbegin() const noexcept
Returns a reverse iterator to the first loop of the reversed list.
constexpr const_reverse_iterator crend() const noexcept
Returns a reverse iterator to the loop following the last loop of the reversed list.
constexpr std::size_t size() const noexcept
Returns the number of loops in the list.
brep_loop * back() const noexcept
Returns the last loop.
constexpr const_reverse_iterator rend() const noexcept
Returns a reverse iterator to the loop following the last loop of the reversed list.
Curve segment bounded by two vertices.
constexpr std::size_t index() const noexcept
Returns the index of this edge in the mesh edge array.
constexpr const brep_edge_loop_list & loops() const noexcept
Returns the list of loops that share this edge.
constexpr const std::array< brep_vertex *, 2 > & vertices() const noexcept
Returns the pair of vertices that bound this edge.
Container for B-rep elements.
virtual element_type * emplace_back()
Appends a new element to the end of the container.
Connected boundary of a single face.
Boundary representation (B-rep) of a mesh.
List of B-rep edges bounded by a common vertex.
constexpr value_type operator*() const noexcept
const_iterator & operator--() noexcept
const_iterator operator++(int) noexcept
std::bidirectional_iterator_tag iterator_concept
const_iterator operator--(int) noexcept
std::ptrdiff_t difference_type
bool operator==(const const_iterator &other) const noexcept
std::bidirectional_iterator_tag iterator_category
constexpr value_type operator->() const noexcept
std::weak_ordering operator<=>(const const_iterator &other) const noexcept
difference_type operator-(const const_iterator &rhs) const noexcept
const_iterator & operator++() noexcept