TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::index::UniformGrid Class Reference

#include <index/uniform_grid.hpp>

Public Member Functions

 UniformGrid (geom::Box bounds, Coord cell, std::size_t max_ids)
void insert (int id, const geom::Box &box)
void erase (int id, const geom::Box &box)
 Calls f(id) once for every id whose inserted box shares a cell with box.
template<class F>
void query (const geom::Box &box, F &&f)

Detailed Description

Definition at line 13 of file uniform_grid.hpp.

Constructor & Destructor Documentation

◆ UniformGrid()

tmk::index::UniformGrid::UniformGrid ( geom::Box bounds,
Coord cell,
std::size_t max_ids )
inline

Definition at line 15 of file uniform_grid.hpp.

Member Function Documentation

◆ erase()

void tmk::index::UniformGrid::erase ( int id,
const geom::Box & box )
inline

Calls f(id) once for every id whose inserted box shares a cell with box.

Removes id from the cells of box (the box it was inserted with).

Definition at line 32 of file uniform_grid.hpp.

◆ insert()

void tmk::index::UniformGrid::insert ( int id,
const geom::Box & box )
inline

Definition at line 22 of file uniform_grid.hpp.

◆ query()

template<class F>
void tmk::index::UniformGrid::query ( const geom::Box & box,
F && f )
inline

Definition at line 40 of file uniform_grid.hpp.


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