OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::MutablePolygon::range Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/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
77: range(poly.begin(), poly.end()) {}
range(MutablePolygon &poly)
Definition MutablePolygon.hpp:77
void poly(std::vector< std::pair< Vec2d, Vec2d > > &out, std::initializer_list< Vec2d > p)
Definition DesignSketchTool.cpp:7751

References Slic3r::MutablePolygon::MutablePolygon(), range(), begin(), and end().

Referenced by range().

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

◆ range() [2/2]

Slic3r::MutablePolygon::range::range ( MutablePolygon::iterator begin,
MutablePolygon::iterator end )
inline
78: m_begin(begin), m_end(end) {}
MutablePolygon::iterator begin() const
Definition MutablePolygon.hpp:81
MutablePolygon::iterator end() const
Definition MutablePolygon.hpp:83
MutablePolygon::iterator m_begin
Definition MutablePolygon.hpp:126
MutablePolygon::iterator m_end
Definition MutablePolygon.hpp:127

References begin(), end(), m_begin, and m_end.

Here is the call graph for this function:

Member Function Documentation

◆ advance_front()

void Slic3r::MutablePolygon::range::advance_front ( )
inline
95 {
96 assert(! this->empty());
97 if (m_begin == m_end)
98 this->make_empty();
99 else
100 ++ m_begin;
101 }
bool empty() const
Definition MutablePolygon.hpp:85
void make_empty()
Definition MutablePolygon.hpp:129

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
81{ return m_begin; }

References m_begin.

Referenced by range(), and range().

Here is the caller graph for this function:

◆ empty()

bool Slic3r::MutablePolygon::range::empty ( ) const
inline
85{ return !m_begin.valid(); }

References m_begin.

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

Here is the caller graph for this function:

◆ end()

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

References m_end.

Referenced by range(), and range().

Here is the caller graph for this function:

◆ make_empty()

void Slic3r::MutablePolygon::range::make_empty ( )
inlineprivate
129 {
130 m_begin.m_idx = -1;
131 m_end.m_idx = -1;
132 }

References m_begin, and m_end.

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
88 {
89 assert(!this->empty());
90 MutablePolygon::iterator out = m_begin;
91 this->advance_front();
92 return out;
93 }
void advance_front()
Definition MutablePolygon.hpp:95

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
117 {
118 if (! this->empty() && m_end == it)
119 this->retract_back();
120 return it.remove();
121 }
void retract_back()
Definition MutablePolygon.hpp:103

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
111 {
112 if (! this->empty() && m_begin == it)
113 this->advance_front();
114 return it.remove();
115 }

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
103 {
104 assert(! this->empty());
105 if (m_begin == m_end)
106 this->make_empty();
107 else
108 -- m_end;
109 }

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: