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

Forward iterator flattening the region's rings into one vertex sequence: the outer boundary, then each hole in canonical order. More...

#include <polygonwithholes.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 PolygonWithHoles

Detailed Description

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

Forward iterator flattening the region's rings into one vertex sequence: the outer boundary, then each hole in canonical order.

The rings are separate Polygon objects, so this holds a ring index and a vertex index rather than a single underlying iterator. Ring index 0 is the outer boundary and ring i + 1 is hole i.

Member Typedef Documentation

◆ difference_type

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

◆ iterator_category

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

◆ iterator_concept

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

◆ reference

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

◆ value_type

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

Constructor & Destructor Documentation

◆ VertexIterator()

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

Member Function Documentation

◆ operator*()

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

◆ operator++() [1/2]

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

◆ operator++() [2/2]

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

◆ operator==()

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

◆ PolygonWithHoles

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