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

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

Collaboration diagram for Slic3r::sla::BoxIndex:

Classes

class  Impl

Public Types

enum  QueryType { qtIntersects , qtWithin }

Public Member Functions

 BoxIndex ()
 ~BoxIndex ()
 BoxIndex (const BoxIndex &)
 BoxIndex (BoxIndex &&)
BoxIndex & operator= (const BoxIndex &)
BoxIndex & operator= (BoxIndex &&)
void insert (const BoxIndexEl &)
void insert (const BoundingBox &bb, unsigned idx)
bool remove (const BoxIndexEl &)
std::vector< BoxIndexEl > query (const BoundingBox &, QueryType qt)
size_t size () const
bool empty () const
void foreach (std::function< void(const BoxIndexEl &el)> fn)

Private Attributes

std::unique_ptr< Impl > m_impl

Detailed Description


Class Documentation

◆ Slic3r::sla::BoxIndex::Impl

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

Member Enumeration Documentation

◆ QueryType

Enumerator
qtIntersects 
qtWithin 
@ qtWithin
Definition SpatIndex.hpp:86
@ qtIntersects
Definition SpatIndex.hpp:86

Constructor & Destructor Documentation

◆ BoxIndex() [1/3]

Slic3r::sla::BoxIndex::BoxIndex ( )
113: m_impl(new Impl()) {}
std::unique_ptr< Impl > m_impl
Definition SpatIndex.hpp:67
Definition SpatIndex.cpp:105

References m_impl.

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

Here is the caller graph for this function:

◆ ~BoxIndex()

Slic3r::sla::BoxIndex::~BoxIndex ( )
114{}

◆ BoxIndex() [2/3]

Slic3r::sla::BoxIndex::BoxIndex ( const BoxIndex & cpy)
116: m_impl(new Impl(*cpy.m_impl)) {}

References BoxIndex(), and m_impl.

Here is the call graph for this function:

◆ BoxIndex() [3/3]

Slic3r::sla::BoxIndex::BoxIndex ( BoxIndex && cpy)
117: m_impl(std::move(cpy.m_impl)) {}

References BoxIndex(), and m_impl.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

bool Slic3r::sla::BoxIndex::empty ( ) const
inline
92{ return size() == 0; }
size_t size() const
Definition SpatIndex.cpp:159

References size().

Here is the call graph for this function:

◆ foreach()

void Slic3r::sla::BoxIndex::foreach ( std::function< void(const BoxIndexEl &el)> fn)
165{
166 for(auto& el : m_impl->m_store) fn(el);
167}

References m_impl.

◆ insert() [1/2]

void Slic3r::sla::BoxIndex::insert ( const BoundingBox & bb,
unsigned idx )
inline
80 {
81 insert(std::make_pair(bb, unsigned(idx)));
82 }
void insert(const BoxIndexEl &)
Definition SpatIndex.cpp:131

References insert().

Here is the call graph for this function:

◆ insert() [2/2]

void Slic3r::sla::BoxIndex::insert ( const BoxIndexEl & el)
132{
133 m_impl->m_store.insert(el);
134}

References m_impl.

Referenced by insert().

Here is the caller graph for this function:

◆ operator=() [1/2]

BoxIndex & Slic3r::sla::BoxIndex::operator= ( BoxIndex && cpy)
126{
127 m_impl.swap(cpy.m_impl);
128 return *this;
129}

References BoxIndex(), and m_impl.

Here is the call graph for this function:

◆ operator=() [2/2]

BoxIndex & Slic3r::sla::BoxIndex::operator= ( const BoxIndex & cpy)
120{
121 m_impl.reset(new Impl(*cpy.m_impl));
122 return *this;
123}

References BoxIndex(), and m_impl.

Here is the call graph for this function:

◆ query()

std::vector< BoxIndexEl > Slic3r::sla::BoxIndex::query ( const BoundingBox & qrbb,
BoxIndex::QueryType qt )
143{
144 namespace bgi = boost::geometry::index;
145
146 std::vector<BoxIndexEl> ret; ret.reserve(m_impl->m_store.size());
147
148 switch (qt) {
149 case qtIntersects:
150 m_impl->m_store.query(bgi::intersects(qrbb), std::back_inserter(ret));
151 break;
152 case qtWithin:
153 m_impl->m_store.query(bgi::within(qrbb), std::back_inserter(ret));
154 }
155
156 return ret;
157}

References m_impl, qtIntersects, and qtWithin.

◆ remove()

bool Slic3r::sla::BoxIndex::remove ( const BoxIndexEl & el)
137{
138 return m_impl->m_store.remove(el) == 1;
139}

References m_impl.

◆ size()

size_t Slic3r::sla::BoxIndex::size ( ) const
160{
161 return m_impl->m_store.size();
162}

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::BoxIndex::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