Template Class SpatialHash

Class Documentation

template<typename BlockDataT, int dim>
class SpatialHash

Public Types

using BlockIndex = Index<dim>
using BlockData = BlockDataT

Public Functions

inline bool empty() const
inline size_t size() const
inline void clear()
Index<dim> getMinBlockIndex() const
Index<dim> getMaxBlockIndex() const
bool hasBlock(const BlockIndex &block_index) const
bool eraseBlock(const BlockIndex &block_index)
template<typename IndexedBlockVisitor>
void eraseBlockIf(IndexedBlockVisitor indicator_fn)
BlockData *getBlock(const BlockIndex &block_index)
const BlockData *getBlock(const BlockIndex &block_index) const
template<typename ...DefaultArgs>
BlockData &getOrAllocateBlock(const BlockIndex &block_index, DefaultArgs&&... args)
inline auto &getHashMap()
inline const auto &getHashMap() const
template<typename IndexedBlockVisitor>
void forEachBlock(IndexedBlockVisitor visitor_fn)
template<typename IndexedBlockVisitor>
void forEachBlock(IndexedBlockVisitor visitor_fn) const

Public Static Attributes

static constexpr IndexElement kDim = dim