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

Forward iterator over the three boundary points. More...

#include <disk.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 = const PointType&

Public Member Functions

constexpr PointIterator ()=default
 Creates a singular (past-the-end style) iterator.
constexpr reference operator* () const
 Returns the boundary point at the current position.
constexpr PointIteratoroperator++ ()
 Advances to the next boundary point (pre-increment).
constexpr PointIterator operator++ (int)
 Advances to the next boundary point (post-increment).
constexpr bool operator== (const PointIterator &other) const =default
 Returns whether both iterators refer to the same position.

Friends

struct Disk
 Deduces a default disk with Point<> boundary points and no label.

Detailed Description

template<class PointType_, class TLabel>
class pgl::Disk< PointType_, TLabel >::PointIterator

Forward iterator over the three boundary points.

Member Typedef Documentation

◆ difference_type

template<class PointType_, class TLabel>
using pgl::Disk< PointType_, TLabel >::PointIterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<class PointType_, class TLabel>
using pgl::Disk< PointType_, TLabel >::PointIterator::iterator_category = std::forward_iterator_tag

◆ iterator_concept

template<class PointType_, class TLabel>
using pgl::Disk< PointType_, TLabel >::PointIterator::iterator_concept = std::forward_iterator_tag

◆ reference

template<class PointType_, class TLabel>
using pgl::Disk< PointType_, TLabel >::PointIterator::reference = const PointType&

◆ value_type

template<class PointType_, class TLabel>
using pgl::Disk< PointType_, TLabel >::PointIterator::value_type = PointType

Constructor & Destructor Documentation

◆ PointIterator()

template<class PointType_, class TLabel>
pgl::Disk< PointType_, TLabel >::PointIterator::PointIterator ( )
constexprdefault

Creates a singular (past-the-end style) iterator.

Member Function Documentation

◆ operator*()

template<class PointType_, class TLabel>
reference pgl::Disk< PointType_, TLabel >::PointIterator::operator* ( ) const
inlineconstexpr

Returns the boundary point at the current position.

◆ operator++() [1/2]

template<class PointType_, class TLabel>
PointIterator & pgl::Disk< PointType_, TLabel >::PointIterator::operator++ ( )
inlineconstexpr

Advances to the next boundary point (pre-increment).

◆ operator++() [2/2]

template<class PointType_, class TLabel>
PointIterator pgl::Disk< PointType_, TLabel >::PointIterator::operator++ ( int )
inlineconstexpr

Advances to the next boundary point (post-increment).

◆ operator==()

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

Returns whether both iterators refer to the same position.

◆ Disk

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

Deduces a default disk with Point<> boundary points and no label.