Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::trianglulate_wall_detail::Ring Class Reference

#include <src/libslic3r/TriangulateWall.hpp>

Public Member Functions

 Ring (size_t from, size_t to)
 
size_t size () const
 
std::pair< size_t, size_t > pos () const
 
bool is_lower () const
 
void inc ()
 
void init (size_t pos)
 
bool is_finished () const
 

Private Attributes

size_t idx = 0
 
size_t nextidx = 1
 
size_t startidx = 0
 
size_t begin = 0
 
size_t end = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ Ring()

Slic3r::trianglulate_wall_detail::Ring::Ring ( size_t  from,
size_t  to 
)
inlineexplicit
14: begin(from), end(to) { init(begin); }
void init(size_t pos)
Definition TriangulateWall.hpp:28
size_t end
Definition TriangulateWall.hpp:11
size_t begin
Definition TriangulateWall.hpp:11

References begin, and init().

+ Here is the call graph for this function:

Member Function Documentation

◆ inc()

void Slic3r::trianglulate_wall_detail::Ring::inc ( )
inline
21 {
22 if (nextidx != startidx) nextidx++;
23 if (nextidx == end) nextidx = begin;
24 idx ++;
25 if (idx == end) idx = begin;
26 }
size_t nextidx
Definition TriangulateWall.hpp:11
size_t startidx
Definition TriangulateWall.hpp:11
size_t idx
Definition TriangulateWall.hpp:11

References begin, end, idx, nextidx, and startidx.

Referenced by Slic3r::trianglulate_wall_detail::Triangulator< Sc >::run(), and Slic3r::trianglulate_wall_detail::Triangulator< Sc >::synchronize_rings().

+ Here is the caller graph for this function:

◆ init()

void Slic3r::trianglulate_wall_detail::Ring::init ( size_t  pos)
inline
29 {
30 startidx = begin + (pos - begin) % size();
31 idx = startidx;
32 nextidx = begin + (idx + 1 - begin) % size();
33 }
std::pair< size_t, size_t > pos() const
Definition TriangulateWall.hpp:17
size_t size() const
Definition TriangulateWall.hpp:16

References begin, idx, nextidx, pos(), size(), and startidx.

Referenced by Ring(), and Slic3r::trianglulate_wall_detail::Triangulator< Sc >::synchronize_rings().

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

◆ is_finished()

bool Slic3r::trianglulate_wall_detail::Ring::is_finished ( ) const
inline
35{ return nextidx == idx; }

References idx, and nextidx.

Referenced by Slic3r::trianglulate_wall_detail::Triangulator< Sc >::run(), and Slic3r::trianglulate_wall_detail::Triangulator< Sc >::synchronize_rings().

+ Here is the caller graph for this function:

◆ is_lower()

bool Slic3r::trianglulate_wall_detail::Ring::is_lower ( ) const
inline
18{ return idx < size(); }

References idx, and size().

Referenced by Slic3r::trianglulate_wall_detail::Triangulator< Sc >::emplace_indices().

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

◆ pos()

std::pair< size_t, size_t > Slic3r::trianglulate_wall_detail::Ring::pos ( ) const
inline
17{ return {idx, nextidx}; }

References idx, and nextidx.

Referenced by Slic3r::trianglulate_wall_detail::Triangulator< Sc >::emplace_indices(), init(), Slic3r::trianglulate_wall_detail::Triangulator< Sc >::synchronize_rings(), and Slic3r::trianglulate_wall_detail::trscore().

+ Here is the caller graph for this function:

◆ size()

size_t Slic3r::trianglulate_wall_detail::Ring::size ( ) const
inline
16{ return end - begin; }

References begin, and end.

Referenced by init(), and is_lower().

+ Here is the caller graph for this function:

Member Data Documentation

◆ begin

size_t Slic3r::trianglulate_wall_detail::Ring::begin = 0
private

Referenced by Ring(), inc(), init(), and size().

◆ end

size_t Slic3r::trianglulate_wall_detail::Ring::end = 0
private

Referenced by inc(), and size().

◆ idx

size_t Slic3r::trianglulate_wall_detail::Ring::idx = 0
private

Referenced by inc(), init(), is_finished(), is_lower(), and pos().

◆ nextidx

size_t Slic3r::trianglulate_wall_detail::Ring::nextidx = 1
private

Referenced by inc(), init(), is_finished(), and pos().

◆ startidx

size_t Slic3r::trianglulate_wall_detail::Ring::startidx = 0
private

Referenced by inc(), and init().


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