EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
EBGeometry_DCEL_Iterator.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022 Robert Marskar <robert.marskar@sintef.no>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
11#ifndef EBGEOMETRY_DCEL_ITERATOR_HPP
12#define EBGEOMETRY_DCEL_ITERATOR_HPP
13
14// Std includes
15#include <memory>
16#include <type_traits>
17
18// Our includes
19#include "EBGeometry_DCEL.hpp"
20
21namespace EBGeometry {
22
23namespace DCEL {
24
40template <class T, class Meta>
42{
43 static_assert(std::is_floating_point_v<T>, "T must be a floating-point type");
44
45public:
50
55
60
64 using VertexPtr = std::shared_ptr<Vertex>;
65
69 using EdgePtr = std::shared_ptr<Edge>;
70
74 using FacePtr = std::shared_ptr<Face>;
75
79 EdgeIteratorT() = delete;
80
89
97 EdgeIteratorT(const Face& a_face) noexcept;
98
107
112 EdgeIteratorT(const EdgeIteratorT& a_other) noexcept = default;
113
118 EdgeIteratorT(EdgeIteratorT&& a_other) noexcept = default;
119
124
132
140
147
154
159 inline void
161
165 inline void
167
172 [[nodiscard]] inline bool
174
180
184 std::shared_ptr<Edge> m_startEdge = nullptr;
185
189 std::shared_ptr<Edge> m_curEdge = nullptr;
190};
191} // namespace DCEL
192
193} // namespace EBGeometry
194
195#include "EBGeometry_DCEL_IteratorImplem.hpp"
196
197#endif
Namespace documentation.
Half-edge iterator class for navigating the half edge mesh.
Definition EBGeometry_DCEL_Iterator.hpp:42
std::shared_ptr< Edge > EdgePtr
Alias for edge pointer.
Definition EBGeometry_DCEL_Iterator.hpp:69
EdgeIteratorT(const EdgePtr &a_startEdge) noexcept
Constructor, taking an arbitrary starting half-edge directly (rather than a face's own half-edge)....
EdgeIteratorT(Face &a_face) noexcept
Constructor, taking a face as argument. The iterator begins at the half-edge pointer contained in the...
std::shared_ptr< Edge > m_startEdge
Starting half-edge.
Definition EBGeometry_DCEL_Iterator.hpp:184
std::shared_ptr< Edge > m_curEdge
Current half-edge.
Definition EBGeometry_DCEL_Iterator.hpp:189
~EdgeIteratorT() noexcept=default
Destructor.
EdgeIteratorT(EdgeIteratorT &&a_other) noexcept=default
Move constructor.
std::shared_ptr< Face > FacePtr
Alias for face pointer.
Definition EBGeometry_DCEL_Iterator.hpp:74
std::shared_ptr< Vertex > VertexPtr
Alias for vertex pointer.
Definition EBGeometry_DCEL_Iterator.hpp:64
EdgeIteratorT(const EdgeIteratorT &a_other) noexcept=default
Copy constructor.
void reset() noexcept
Reset function for the iterator. This resets the iterator so that it begins from the starting half-ed...
bool m_fullLoop
If true, a full loop has been made around the polygon face.
Definition EBGeometry_DCEL_Iterator.hpp:179
EdgeIteratorT()=delete
Default construction is not allowed. Use one of the full constructors.
EdgeIteratorT(const Face &a_face) noexcept
Constructor, taking a face as argument. The iterator begins at the half-edge pointer contained in the...
bool ok() const noexcept
Function which checks if the iteration can be continued.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31