Pangolin
Header-only C++20 plane computational geometry library
Loading...
Searching...
No Matches
pgl::PolygonSet< PointType_, TLabel >::VertexIterator Class Reference

Forward iterator flattening every component's rings into one vertex sequence, components in canonical order. More...

#include <polygonset.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
using iterator_concept = std::forward_iterator_tag
using value_type = PointType
using difference_type = std::ptrdiff_t
using reference = value_type

Public Member Functions

constexpr VertexIterator ()=default
constexpr value_type operator* () const
constexpr VertexIteratoroperator++ ()
constexpr VertexIterator operator++ (int)
constexpr bool operator== (const VertexIterator &other) const =default

Friends

struct PolygonSet

Detailed Description

template<class PointType_, class TLabel>
class pgl::PolygonSet< PointType_, TLabel >::VertexIterator

Forward iterator flattening every component's rings into one vertex sequence, components in canonical order.

Each component already flattens its own rings, so this pairs a component index with that component's PolygonWithHoles::VertexIterator and rolls over to the next component when the inner iterator runs out.

Member Typedef Documentation

◆ difference_type

template<class PointType_, class TLabel>
using pgl::PolygonSet< PointType_, TLabel >::VertexIterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<class PointType_, class TLabel>
using pgl::PolygonSet< PointType_, TLabel >::VertexIterator::iterator_category = std::forward_iterator_tag

◆ iterator_concept

template<class PointType_, class TLabel>
using pgl::PolygonSet< PointType_, TLabel >::VertexIterator::iterator_concept = std::forward_iterator_tag

◆ reference

template<class PointType_, class TLabel>
using pgl::PolygonSet< PointType_, TLabel >::VertexIterator::reference = value_type

◆ value_type

template<class PointType_, class TLabel>
using pgl::PolygonSet< PointType_, TLabel >::VertexIterator::value_type = PointType

Constructor & Destructor Documentation

◆ VertexIterator()

template<class PointType_, class TLabel>
pgl::PolygonSet< PointType_, TLabel >::VertexIterator::VertexIterator ( )
constexprdefault

Member Function Documentation

◆ operator*()

template<class PointType_, class TLabel>
value_type pgl::PolygonSet< PointType_, TLabel >::VertexIterator::operator* ( ) const
inlineconstexpr

◆ operator++() [1/2]

template<class PointType_, class TLabel>
VertexIterator & pgl::PolygonSet< PointType_, TLabel >::VertexIterator::operator++ ( )
inlineconstexpr

◆ operator++() [2/2]

template<class PointType_, class TLabel>
VertexIterator pgl::PolygonSet< PointType_, TLabel >::VertexIterator::operator++ ( int )
inlineconstexpr

◆ operator==()

template<class PointType_, class TLabel>
bool pgl::PolygonSet< PointType_, TLabel >::VertexIterator::operator== ( const VertexIterator & other) const
constexprdefault

◆ PolygonSet

template<class PointType_, class TLabel>
friend struct PolygonSet
friend