OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Arachne::PolygonsSegmentIndex Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Arachne/utils/PolygonsSegmentIndex.hpp>

Inheritance diagram for Slic3r::Arachne::PolygonsSegmentIndex:
Collaboration diagram for Slic3r::Arachne::PolygonsSegmentIndex:

Public Member Functions

 PolygonsSegmentIndex ()
 PolygonsSegmentIndex (const Polygons *polygons, unsigned int poly_idx, unsigned int point_idx)
Point from () const
Point to () const
Point p () const
bool initialized () const
 Returns whether this point is initialised.
const Polygon & getPolygon () const
bool operator== (const PathsPointIndex &other) const
bool operator!= (const PathsPointIndex &other) const
bool operator< (const PathsPointIndex &other) const
PathsPointIndex & operator++ ()
 move the iterator forward (and wrap around at the end)
PathsPointIndex & operator-- ()
 move the iterator backward (and wrap around at the beginning)
PathsPointIndex next () const
 move the iterator forward (and wrap around at the end)
PathsPointIndex prev () const
 move the iterator backward (and wrap around at the beginning)

Public Attributes

const Polygons * polygons
unsigned int poly_idx
 The index of the polygon in PolygonsPointIndex::polygons.
unsigned int point_idx
 The index of the point in the polygon in PolygonsPointIndex::polygons.

Detailed Description

A class for iterating over the points in one of the polygons in a Polygons object

Constructor & Destructor Documentation

◆ PolygonsSegmentIndex() [1/2]

Slic3r::Arachne::PolygonsSegmentIndex::PolygonsSegmentIndex ( )
inline
PathsPointIndex< Polygons > PolygonsPointIndex
Definition PolygonsPointIndex.hpp:133

◆ PolygonsSegmentIndex() [2/2]

Slic3r::Arachne::PolygonsSegmentIndex::PolygonsSegmentIndex ( const Polygons * polygons,
unsigned int poly_idx,
unsigned int point_idx )
inline

Member Function Documentation

◆ from()

Point Slic3r::Arachne::PolygonsSegmentIndex::from ( ) const
inline
26{ return PolygonsPointIndex::p(); }
Point p() const
Definition PolygonsPointIndex.hpp:60

References Slic3r::Arachne::PathsPointIndex< Polygons >::p().

Referenced by boost::polygon::segment_traits< Slic3r::Arachne::PolygonsSegmentIndex >::get().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPolygon()

const Polygon & Slic3r::Arachne::PathsPointIndex< Polygons >::getPolygon ( ) const
inlineinherited

Get the polygon to which this PolygonsPointIndex refers

76{ return (*polygons)[poly_idx]; }
Definition PolygonsPointIndex.hpp:27

References poly_idx, and polygons.

◆ initialized()

bool Slic3r::Arachne::PathsPointIndex< Polygons >::initialized ( ) const
inlineinherited

Returns whether this point is initialised.

71{ return polygons; }

References polygons.

◆ next()

PathsPointIndex Slic3r::Arachne::PathsPointIndex< Polygons >::next ( ) const
inlineinherited

move the iterator forward (and wrap around at the end)

119 {
120 PathsPointIndex ret(*this);
121 ++ret;
122 return ret;
123 }

References PathsPointIndex().

Referenced by Slic3r::Arachne::PolygonsSegmentIndex::to().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool Slic3r::Arachne::PathsPointIndex< Polygons >::operator!= ( const PathsPointIndex< Polygons > & other) const
inlineinherited
89 {
90 return !(*this == other);
91 }

References PathsPointIndex().

Here is the call graph for this function:

◆ operator++()

PathsPointIndex & Slic3r::Arachne::PathsPointIndex< Polygons >::operator++ ( )
inlineinherited

move the iterator forward (and wrap around at the end)

105 {
106 point_idx = (point_idx + 1) % (*polygons)[poly_idx].size();
107 return *this;
108 }

References PathsPointIndex(), point_idx, poly_idx, and polygons.

Here is the call graph for this function:

◆ operator--()

PathsPointIndex & Slic3r::Arachne::PathsPointIndex< Polygons >::operator-- ( )
inlineinherited

move the iterator backward (and wrap around at the beginning)

111 {
112 if (point_idx == 0)
113 point_idx = (*polygons)[poly_idx].size();
114 point_idx--;
115 return *this;
116 }

References PathsPointIndex(), point_idx, and poly_idx.

Here is the call graph for this function:

◆ operator<()

bool Slic3r::Arachne::PathsPointIndex< Polygons >::operator< ( const PathsPointIndex< Polygons > & other) const
inlineinherited
93 {
94 return this->p() < other.p();
95 }

References PathsPointIndex(), and Slic3r::Arachne::PathsPointIndex< Paths >::p().

Here is the call graph for this function:

◆ operator==()

bool Slic3r::Arachne::PathsPointIndex< Polygons >::operator== ( const PathsPointIndex< Polygons > & other) const
inlineinherited

Test whether two iterators refer to the same polygon in the same polygon list.

Parameters
otherThe PolygonsPointIndex to test for equality
Returns
Wether the right argument refers to the same polygon in the same ListPolygon as the left argument.
85 {
87 }

References PathsPointIndex(), Slic3r::Arachne::PathsPointIndex< Paths >::point_idx, point_idx, Slic3r::Arachne::PathsPointIndex< Paths >::poly_idx, poly_idx, Slic3r::Arachne::PathsPointIndex< Paths >::polygons, and polygons.

Here is the call graph for this function:

◆ p()

Point Slic3r::Arachne::PathsPointIndex< Polygons >::p ( ) const
inlineinherited
61 {
62 if (!polygons)
63 return {0, 0};
64
66 }
const Point & make_point(const ExtrusionJunction &ej)
Definition ExtrusionJunction.hpp:60

References Slic3r::Arachne::make_point(), point_idx, poly_idx, and polygons.

Referenced by Slic3r::Arachne::PolygonsSegmentIndex::from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prev()

PathsPointIndex Slic3r::Arachne::PathsPointIndex< Polygons >::prev ( ) const
inlineinherited

move the iterator backward (and wrap around at the beginning)

126 {
127 PathsPointIndex ret(*this);
128 --ret;
129 return ret;
130 }

References PathsPointIndex().

Here is the call graph for this function:

◆ to()

Point Slic3r::Arachne::PolygonsSegmentIndex::to ( ) const
inline
28{ return PolygonsSegmentIndex::next().p(); }
PathsPointIndex next() const
Definition PolygonsPointIndex.hpp:118

References Slic3r::Arachne::PathsPointIndex< Polygons >::next(), and Slic3r::Arachne::PathsPointIndex< Paths >::p().

Referenced by boost::polygon::segment_traits< Slic3r::Arachne::PolygonsSegmentIndex >::get().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ point_idx

◆ poly_idx

◆ polygons


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