MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ remove()

template<typename PointT >
void MayaFlux::Kinesis::SpatialIndex< PointT >::remove ( uint32_t  id)

Remove an entity from the index.

Parameters
idEntity id returned by insert().

Definition at line 136 of file SpatialIndex.cpp.

137{
138 auto it = m_id_to_slot.find(id);
139 if (it == m_id_to_slot.end()) {
141 "SpatialIndex::remove: unknown id {}", id);
142 return;
143 }
144
145 uint32_t slot = it->second;
146 m_free_slots.push_back(slot);
147 m_slot_to_id[slot] = UINT32_MAX;
148 m_id_to_slot.erase(it);
149}
#define MF_WARN(comp, ctx,...)
std::vector< uint32_t > m_free_slots
std::unordered_map< uint32_t, uint32_t > m_id_to_slot
std::vector< uint32_t > m_slot_to_id
@ Runtime
General runtime operations (default fallback)
@ Kinesis
General mathematical and physics algorithns.

References MayaFlux::Journal::Kinesis, MF_WARN, and MayaFlux::Journal::Runtime.