Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::MutablePolygon::range Class Reference

#include <src/libslic3r/MutablePolygon.hpp>

+ Collaboration diagram for Slic3r::MutablePolygon::range:

Public Member Functions

 range (MutablePolygon &poly)
 
 range (MutablePolygon::iterator begin, MutablePolygon::iterator end)
 
MutablePolygon::iterator begin () const
 
MutablePolygon::iterator end () const
 
bool empty () const
 
MutablePolygon::iterator process_next ()
 
void advance_front ()
 
void retract_back ()
 
MutablePolygon::iterator remove_front (MutablePolygon::iterator it)
 
MutablePolygon::iterator remove_back (MutablePolygon::iterator it)
 

Private Member Functions

void make_empty ()
 

Private Attributes

MutablePolygon::iterator m_begin
 
MutablePolygon::iterator m_end
 

Detailed Description

Constructor & Destructor Documentation

◆ range() [1/2]

Slic3r::MutablePolygon::range::range ( MutablePolygon poly)
inline
70: range(poly.begin(), poly.end()) {}
range(MutablePolygon &poly)
Definition MutablePolygon.hpp:70

◆ range() [2/2]

Slic3r::MutablePolygon::range::range ( MutablePolygon::iterator  begin,
MutablePolygon::iterator  end 
)
inline
71: m_begin(begin), m_end(end) {}
MutablePolygon::iterator begin() const
Definition MutablePolygon.hpp:74
MutablePolygon::iterator end() const
Definition MutablePolygon.hpp:76
MutablePolygon::iterator m_begin
Definition MutablePolygon.hpp:119
MutablePolygon::iterator m_end
Definition MutablePolygon.hpp:120

Member Function Documentation

◆ advance_front()

void Slic3r::MutablePolygon::range::advance_front ( )
inline
88 {
89 assert(! this->empty());
90 if (m_begin == m_end)
91 this->make_empty();
92 else
93 ++ m_begin;
94 }
bool empty() const
Definition MutablePolygon.hpp:78
void make_empty()
Definition MutablePolygon.hpp:122

References empty(), m_begin, m_end, and make_empty().

Referenced by process_next(), and remove_front().

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

◆ begin()

MutablePolygon::iterator Slic3r::MutablePolygon::range::begin ( ) const
inline
74{ return m_begin; }

References m_begin.

◆ empty()

bool Slic3r::MutablePolygon::range::empty ( ) const
inline
78{ return !m_begin.valid(); }
bool valid() const
Definition MutablePolygon.hpp:51

References m_begin, and Slic3r::MutablePolygon::iterator::valid().

Referenced by advance_front(), process_next(), remove_back(), remove_front(), retract_back(), and Slic3r::smooth_outward().

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

◆ end()

MutablePolygon::iterator Slic3r::MutablePolygon::range::end ( ) const
inline
76{ return m_end; }

References m_end.

◆ make_empty()

void Slic3r::MutablePolygon::range::make_empty ( )
inlineprivate
122 {
123 m_begin.m_idx = -1;
124 m_end.m_idx = -1;
125 }
IndexType m_idx
Definition MutablePolygon.hpp:62

References m_begin, m_end, and Slic3r::MutablePolygon::iterator::m_idx.

Referenced by advance_front(), and retract_back().

+ Here is the caller graph for this function:

◆ process_next()

MutablePolygon::iterator Slic3r::MutablePolygon::range::process_next ( )
inline
81 {
82 assert(!this->empty());
83 MutablePolygon::iterator out = m_begin;
84 this->advance_front();
85 return out;
86 }
void advance_front()
Definition MutablePolygon.hpp:88

References advance_front(), empty(), and m_begin.

Referenced by Slic3r::smooth_outward().

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

◆ remove_back()

MutablePolygon::iterator Slic3r::MutablePolygon::range::remove_back ( MutablePolygon::iterator  it)
inline
110 {
111 if (! this->empty() && m_end == it)
112 this->retract_back();
113 return it.remove();
114 }
void retract_back()
Definition MutablePolygon.hpp:96

References empty(), m_end, Slic3r::MutablePolygon::iterator::remove(), and retract_back().

Referenced by Slic3r::clip_narrow_corner().

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

◆ remove_front()

MutablePolygon::iterator Slic3r::MutablePolygon::range::remove_front ( MutablePolygon::iterator  it)
inline
104 {
105 if (! this->empty() && m_begin == it)
106 this->advance_front();
107 return it.remove();
108 }

References advance_front(), empty(), m_begin, and Slic3r::MutablePolygon::iterator::remove().

Referenced by Slic3r::clip_narrow_corner().

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

◆ retract_back()

void Slic3r::MutablePolygon::range::retract_back ( )
inline
96 {
97 assert(! this->empty());
98 if (m_begin == m_end)
99 this->make_empty();
100 else
101 -- m_end;
102 }

References empty(), m_begin, m_end, and make_empty().

Referenced by remove_back().

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

Member Data Documentation

◆ m_begin

MutablePolygon::iterator Slic3r::MutablePolygon::range::m_begin
private

◆ m_end

MutablePolygon::iterator Slic3r::MutablePolygon::range::m_end
private

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