KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T > Class Template Reference

Base class for iterating over all segments in a given SHAPE_POLY_SET. More...

#include <shape_poly_set.h>

Public Member Functions

bool IsLastPolygon () const
 
 operator bool () const
 
void Advance ()
 Advance the indices of the current vertex/outline/contour, checking whether the vertices in the holes have to be iterated through.
 
void operator++ (int dummy)
 
void operator++ ()
 
Get ()
 
operator* ()
 
VERTEX_INDEX GetIndex () const
 
bool IsAdjacent (SEGMENT_ITERATOR_TEMPLATE< T > aOther) const
 

Private Attributes

SHAPE_POLY_SETm_poly
 
int m_currentPolygon
 
int m_currentContour
 
int m_currentSegment
 
int m_lastPolygon
 
bool m_iterateHoles
 

Friends

class SHAPE_POLY_SET
 

Detailed Description

template<class T>
class SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >

Base class for iterating over all segments in a given SHAPE_POLY_SET.

Definition at line 365 of file shape_poly_set.h.

Member Function Documentation

◆ Advance()

◆ Get()

◆ GetIndex()

◆ IsAdjacent()

template<class T >
bool SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::IsAdjacent ( SEGMENT_ITERATOR_TEMPLATE< T >  aOther) const
inline
Parameters
aOtheris an iterator pointing to another segment.
Returns
true if both iterators point to the same segment of the same contour of the same polygon of the same polygon set; false otherwise.

Definition at line 466 of file shape_poly_set.h.

References std::abs(), SHAPE_POLY_SET::CPolygon(), SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentContour, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentPolygon, SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentSegment, and SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_poly.

◆ IsLastPolygon()

template<class T >
bool SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::IsLastPolygon ( ) const
inline
Returns
true if the current outline is the last one.

Definition at line 371 of file shape_poly_set.h.

References SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_currentPolygon, and SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::m_lastPolygon.

◆ operator bool()

◆ operator*()

template<class T >
T SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::operator* ( )
inline

◆ operator++() [1/2]

template<class T >
void SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::operator++ ( )
inline

◆ operator++() [2/2]

template<class T >
void SHAPE_POLY_SET::SEGMENT_ITERATOR_TEMPLATE< T >::operator++ ( int  dummy)
inline

Friends And Related Function Documentation

◆ SHAPE_POLY_SET

template<class T >
friend class SHAPE_POLY_SET
friend

Definition at line 490 of file shape_poly_set.h.

Member Data Documentation

◆ m_currentContour

◆ m_currentPolygon

◆ m_currentSegment

◆ m_iterateHoles

◆ m_lastPolygon

◆ m_poly


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