Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::sla::PointIndex Class Reference

#include <src/libslic3r/SLA/SpatIndex.hpp>

+ Collaboration diagram for Slic3r::sla::PointIndex:

Classes

class  Impl
 

Public Member Functions

 PointIndex ()
 
 ~PointIndex ()
 
 PointIndex (const PointIndex &)
 
 PointIndex (PointIndex &&)
 
PointIndexoperator= (const PointIndex &)
 
PointIndexoperator= (PointIndex &&)
 
void insert (const PointIndexEl &)
 
bool remove (const PointIndexEl &)
 
void insert (const Vec3d &v, unsigned idx)
 
std::vector< PointIndexElquery (std::function< bool(const PointIndexEl &)>) const
 
std::vector< PointIndexElnearest (const Vec3d &, unsigned k) const
 
std::vector< PointIndexElquery (const Vec3d &v, unsigned k) const
 
size_t size () const
 
bool empty () const
 
void foreach (std::function< void(const PointIndexEl &el)> fn)
 
void foreach (std::function< void(const PointIndexEl &el)> fn) const
 

Private Attributes

std::unique_ptr< Implm_impl
 

Detailed Description


Class Documentation

◆ Slic3r::sla::PointIndex::Impl

class Slic3r::sla::PointIndex::Impl
Class Members
typedef rtree< PointIndexEl, rstar< 16, 4 > > BoostIndex
Class Members
BoostIndex m_store

Constructor & Destructor Documentation

◆ PointIndex() [1/3]

Slic3r::sla::PointIndex::PointIndex ( )
32: m_impl(new Impl()) {}
std::unique_ptr< Impl > m_impl
Definition SpatIndex.hpp:23

◆ ~PointIndex()

Slic3r::sla::PointIndex::~PointIndex ( )
33{}

◆ PointIndex() [2/3]

Slic3r::sla::PointIndex::PointIndex ( const PointIndex cpy)
35: m_impl(new Impl(*cpy.m_impl)) {}

◆ PointIndex() [3/3]

Slic3r::sla::PointIndex::PointIndex ( PointIndex &&  cpy)
36: m_impl(std::move(cpy.m_impl)) {}

Member Function Documentation

◆ empty()

bool Slic3r::sla::PointIndex::empty ( ) const
inline
51{ return size() == 0; }
size_t size() const
Definition SpatIndex.cpp:78

References size().

Referenced by Slic3r::sla::DefaultSupportTree::search_pillar_and_connect().

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

◆ foreach() [1/2]

void Slic3r::sla::PointIndex::foreach ( std::function< void(const PointIndexEl &el)>  fn)

Referenced by Slic3r::sla::PillarIndex::foreach(), and Slic3r::sla::PillarIndex::guarded_foreach().

+ Here is the caller graph for this function:

◆ foreach() [2/2]

void Slic3r::sla::PointIndex::foreach ( std::function< void(const PointIndexEl &el)>  fn) const

◆ insert() [1/2]

void Slic3r::sla::PointIndex::insert ( const PointIndexEl el)
51{
52 m_impl->m_store.insert(el);
53}

References m_impl.

Referenced by Slic3r::sla::ConcaveHull::add_connector_rectangles(), Slic3r::sla::PillarIndex::guarded_insert(), Slic3r::sla::PillarIndex::insert(), and insert().

+ Here is the caller graph for this function:

◆ insert() [2/2]

void Slic3r::sla::PointIndex::insert ( const Vec3d v,
unsigned  idx 
)
inline
38 {
39 insert(std::make_pair(v, unsigned(idx)));
40 }
void insert(const PointIndexEl &)
Definition SpatIndex.cpp:50

References insert().

+ Here is the call graph for this function:

◆ nearest()

std::vector< PointIndexEl > Slic3r::sla::PointIndex::nearest ( const Vec3d el,
unsigned  k = 1 
) const
71{
72 namespace bgi = boost::geometry::index;
73 std::vector<PointIndexEl> ret; ret.reserve(k);
74 m_impl->m_store.query(bgi::nearest(el, k), std::back_inserter(ret));
75 return ret;
76}

References m_impl.

Referenced by Slic3r::sla::ConcaveHull::add_connector_rectangles(), query(), and Slic3r::sla::DefaultSupportTree::search_pillar_and_connect().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

PointIndex & Slic3r::sla::PointIndex::operator= ( const PointIndex cpy)
39{
40 m_impl.reset(new Impl(*cpy.m_impl));
41 return *this;
42}

References m_impl.

◆ operator=() [2/2]

PointIndex & Slic3r::sla::PointIndex::operator= ( PointIndex &&  cpy)
45{
46 m_impl.swap(cpy.m_impl);
47 return *this;
48}

References m_impl.

◆ query() [1/2]

std::vector< PointIndexEl > Slic3r::sla::PointIndex::query ( const Vec3d v,
unsigned  k 
) const
inline
45 {
46 return nearest(v, k);
47 }
std::vector< PointIndexEl > nearest(const Vec3d &, unsigned k) const
Definition SpatIndex.cpp:70

References nearest().

+ Here is the call graph for this function:

◆ query() [2/2]

std::vector< PointIndexEl > Slic3r::sla::PointIndex::query ( std::function< bool(const PointIndexEl &)>  fn) const
62{
63 namespace bgi = boost::geometry::index;
64
65 std::vector<PointIndexEl> ret;
66 m_impl->m_store.query(bgi::satisfies(fn), std::back_inserter(ret));
67 return ret;
68}

References m_impl.

Referenced by Slic3r::sla::PillarIndex::guarded_query(), and Slic3r::sla::PillarIndex::query().

+ Here is the caller graph for this function:

◆ remove()

bool Slic3r::sla::PointIndex::remove ( const PointIndexEl el)
56{
57 return m_impl->m_store.remove(el) == 1;
58}

References m_impl.

Referenced by Slic3r::sla::DefaultSupportTree::search_pillar_and_connect().

+ Here is the caller graph for this function:

◆ size()

size_t Slic3r::sla::PointIndex::size ( ) const
79{
80 return m_impl->m_store.size();
81}

References m_impl.

Referenced by empty().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_impl

std::unique_ptr<Impl> Slic3r::sla::PointIndex::m_impl
private

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