OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::sla::PointIndex Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/SpatIndex.hpp>

Collaboration diagram for Slic3r::sla::PointIndex:

Classes

class  Impl

Public Member Functions

 PointIndex ()
 ~PointIndex ()
 PointIndex (const PointIndex &)
 PointIndex (PointIndex &&)
PointIndex & operator= (const PointIndex &)
PointIndex & operator= (PointIndex &&)
void insert (const PointIndexEl &)
bool remove (const PointIndexEl &)
void insert (const Vec3d &v, unsigned idx)
std::vector< PointIndexEl > query (std::function< bool(const PointIndexEl &)>) const
std::vector< PointIndexEl > nearest (const Vec3d &, unsigned k) const
std::vector< PointIndexEl > query (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< Impl > m_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 ( )
40: m_impl(new Impl()) {}
std::unique_ptr< Impl > m_impl
Definition SpatIndex.hpp:26
Definition SpatIndex.cpp:32

References m_impl.

Referenced by PointIndex(), PointIndex(), operator=(), and operator=().

Here is the caller graph for this function:

◆ ~PointIndex()

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

◆ PointIndex() [2/3]

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

References PointIndex(), and m_impl.

Here is the call graph for this function:

◆ PointIndex() [3/3]

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

References PointIndex(), and m_impl.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

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

References size().

Referenced by Slic3r::sla::SupportTreeBuildsteps::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)

◆ 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)
59{
60 m_impl->m_store.insert(el);
61}

References m_impl.

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

Here is the caller graph for this function:

◆ insert() [2/2]

void Slic3r::sla::PointIndex::insert ( const Vec3d & v,
unsigned idx )
inline
41 {
42 insert(std::make_pair(v, unsigned(idx)));
43 }
void insert(const PointIndexEl &)
Definition SpatIndex.cpp:58

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
79{
80 namespace bgi = boost::geometry::index;
81 std::vector<PointIndexEl> ret; ret.reserve(k);
82 m_impl->m_store.query(bgi::nearest(el, k), std::back_inserter(ret));
83 return ret;
84}

References m_impl.

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

Here is the caller graph for this function:

◆ operator=() [1/2]

PointIndex & Slic3r::sla::PointIndex::operator= ( const PointIndex & cpy)
47{
48 m_impl.reset(new Impl(*cpy.m_impl));
49 return *this;
50}

References PointIndex(), and m_impl.

Here is the call graph for this function:

◆ operator=() [2/2]

PointIndex & Slic3r::sla::PointIndex::operator= ( PointIndex && cpy)
53{
54 m_impl.swap(cpy.m_impl);
55 return *this;
56}

References PointIndex(), and m_impl.

Here is the call graph for this function:

◆ query() [1/2]

std::vector< PointIndexEl > Slic3r::sla::PointIndex::query ( const Vec3d & v,
unsigned k ) const
inline
48 {
49 return nearest(v, k);
50 }
std::vector< PointIndexEl > nearest(const Vec3d &, unsigned k) const
Definition SpatIndex.cpp:78

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
70{
71 namespace bgi = boost::geometry::index;
72
73 std::vector<PointIndexEl> ret;
74 m_impl->m_store.query(bgi::satisfies(fn), std::back_inserter(ret));
75 return ret;
76}

References m_impl.

◆ remove()

bool Slic3r::sla::PointIndex::remove ( const PointIndexEl & el)
64{
65 return m_impl->m_store.remove(el) == 1;
66}

References m_impl.

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

Here is the caller graph for this function:

◆ size()

size_t Slic3r::sla::PointIndex::size ( ) const
87{
88 return m_impl->m_store.size();
89}

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:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/SpatIndex.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SLA/SpatIndex.cpp