Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::Geometry::rotcalip::Idx Class Reference
+ Collaboration diagram for Slic3r::Geometry::rotcalip::Idx:

Public Member Functions

 Idx (const Polygon &p)
 
 Idx (size_t idx, const Polygon &p)
 
size_t idx () const
 
void set_idx (size_t i)
 
size_t next () const
 
size_t inc ()
 
Point prev_dir () const
 
const Pointpt () const
 
const Point dir () const
 
const Point next_dir () const
 
const Polygonpoly () const
 

Private Attributes

size_t m_idx
 
const Polygonm_poly
 

Detailed Description

Constructor & Destructor Documentation

◆ Idx() [1/2]

Slic3r::Geometry::rotcalip::Idx::Idx ( const Polygon p)
inlineexplicit
178: m_idx{0}, m_poly{&p} {}
const Polygon * m_poly
Definition ConvexHull.cpp:176
size_t m_idx
Definition ConvexHull.cpp:175

◆ Idx() [2/2]

Slic3r::Geometry::rotcalip::Idx::Idx ( size_t  idx,
const Polygon p 
)
inlineexplicit
179: m_idx{idx}, m_poly{&p} {}
size_t idx() const
Definition ConvexHull.cpp:181

Member Function Documentation

◆ dir()

const Point Slic3r::Geometry::rotcalip::Idx::dir ( ) const
inline
190{ return (*m_poly)[next()] - pt(); }
const Point & pt() const
Definition ConvexHull.cpp:189
size_t next() const
Definition ConvexHull.cpp:183

References m_poly, next(), and pt().

Referenced by Slic3r::Geometry::rotcalip::visit_antipodals().

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

◆ idx()

size_t Slic3r::Geometry::rotcalip::Idx::idx ( ) const
inline
181{ return m_idx; }

References m_idx.

Referenced by Slic3r::Geometry::rotcalip::visit_antipodals().

+ Here is the caller graph for this function:

◆ inc()

size_t Slic3r::Geometry::rotcalip::Idx::inc ( )
inline
184{ return m_idx = (m_idx + 1) % m_poly->size(); }
size_t size() const
Definition MultiPoint.hpp:39

References m_idx, m_poly, and Slic3r::MultiPoint::size().

Referenced by Slic3r::Geometry::rotcalip::visit_antipodals().

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

◆ next()

size_t Slic3r::Geometry::rotcalip::Idx::next ( ) const
inline
183{ return (m_idx + 1) % m_poly->size(); }

References m_idx, m_poly, and Slic3r::MultiPoint::size().

Referenced by dir(), next_dir(), and Slic3r::Geometry::rotcalip::visit_antipodals().

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

◆ next_dir()

const Point Slic3r::Geometry::rotcalip::Idx::next_dir ( ) const
inline
192 {
193 return (*m_poly)[(m_idx + 2) % m_poly->size()] - (*m_poly)[next()];
194 }

References m_idx, m_poly, next(), and Slic3r::MultiPoint::size().

Referenced by Slic3r::Geometry::rotcalip::visit_antipodals().

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

◆ poly()

const Polygon & Slic3r::Geometry::rotcalip::Idx::poly ( ) const
inline
195{ return *m_poly; }

References m_poly.

◆ prev_dir()

Point Slic3r::Geometry::rotcalip::Idx::prev_dir ( ) const
inline
185 {
186 return pt() - (*m_poly)[(m_idx + m_poly->size() - 1) % m_poly->size()];
187 }

References m_idx, m_poly, pt(), and Slic3r::MultiPoint::size().

Referenced by Slic3r::Geometry::rotcalip::visit_antipodals().

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

◆ pt()

const Point & Slic3r::Geometry::rotcalip::Idx::pt ( ) const
inline
189{ return (*m_poly)[m_idx]; }

References m_idx, and m_poly.

Referenced by dir(), and prev_dir().

+ Here is the caller graph for this function:

◆ set_idx()

void Slic3r::Geometry::rotcalip::Idx::set_idx ( size_t  i)
inline
182{ m_idx = i; }

References m_idx.

Member Data Documentation

◆ m_idx

size_t Slic3r::Geometry::rotcalip::Idx::m_idx
private

Referenced by idx(), inc(), next(), next_dir(), prev_dir(), pt(), and set_idx().

◆ m_poly

const Polygon* Slic3r::Geometry::rotcalip::Idx::m_poly
private

Referenced by dir(), inc(), next(), next_dir(), poly(), prev_dir(), and pt().


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