EBGeometry  1.0
Public Types | Public Member Functions | Protected Attributes | List of all members
DCEL::EdgeIteratorT< T, Meta > Class Template Reference

Edge iterator class. More...

#include <EBGeometry_DCEL_Iterator.hpp>

Public Types

using Vertex = VertexT< T, Meta >
 Alias for DCEL vertex type.
 
using Edge = EdgeT< T, Meta >
 Alias for DCEL edge type.
 
using Face = FaceT< T, Meta >
 Alias for DCEL face type.
 
using VertexPtr = std::shared_ptr< Vertex >
 Alias for vertex pointer.
 
using EdgePtr = std::shared_ptr< Edge >
 Alias for edge pointer.
 
using FacePtr = std::shared_ptr< Face >
 Alias for face pointer.
 

Public Member Functions

 EdgeIteratorT ()=delete
 Default construction is not allowed. Use one of the full constructors.
 
 EdgeIteratorT (Face &a_face)
 Constructor, taking a face as argument. The iterator begins at the half-edge pointer contained in the face. More...
 
 EdgeIteratorT (const Face &a_face)
 Constructor, taking a face as argument. The iterator begins at the half-edge pointer contained in the face. More...
 
virtual ~EdgeIteratorT ()=default
 Destructor.
 
EdgePtroperator() () noexcept
 Operator returning a pointer to the current half-edge.
 
const EdgePtroperator() () const noexcept
 Operator returning a pointer to the current half-edge.
 
void reset () noexcept
 Reset function for the iterator. This resets the iterator so that it begins from the starting half-edge.
 
void operator++ () noexcept
 Incrementation operator, bringing the iterator to the next half-edge.
 
bool ok () const noexcept
 Function which checks if the iteration can be continued. More...
 

Protected Attributes

bool m_fullLoop
 If true, a full loop has been made around the polygon face.
 
std::shared_ptr< Edgem_startEdge
 Starting half-edge.
 
std::shared_ptr< Edgem_curEdge
 Current half-edge.
 

Detailed Description

template<class T, class Meta>
class DCEL::EdgeIteratorT< T, Meta >

Edge iterator class.

Class which makes it easier to iterate through DCEL edges.

Constructor & Destructor Documentation

◆ EdgeIteratorT() [1/2]

template<class T , class Meta >
DCEL::EdgeIteratorT< T, Meta >::EdgeIteratorT ( Face a_face)

Constructor, taking a face as argument. The iterator begins at the half-edge pointer contained in the face.

Parameters
[in]a_faceDCEL polygon face
Note
This constructor will will iterate through the half-edges in the polygon face.

◆ EdgeIteratorT() [2/2]

template<class T , class Meta >
DCEL::EdgeIteratorT< T, Meta >::EdgeIteratorT ( const Face a_face)

Constructor, taking a face as argument. The iterator begins at the half-edge pointer contained in the face.

Parameters
[in]a_faceDCEL polygon face
Note
This constructor will will iterate through the half-edges in the polygon face.

Member Function Documentation

◆ ok()

template<class T , class Meta >
bool DCEL::EdgeIteratorT< T, Meta >::ok ( ) const
inlinenoexcept

Function which checks if the iteration can be continued.

Returns
Returns true unless the current half-edge is a nullptr (i.e., a broken polygon face) OR a full loop has been made around the polygon face (i.e. all half-edges have been visited)

The documentation for this class was generated from the following files: