Adding support for a position hint to get_contained_cells for acceleration

This commit is contained in:
Patrick Shriwise 2022-01-28 11:26:48 -06:00
parent f8488e59e8
commit 2332dd2fae
4 changed files with 62 additions and 30 deletions

View file

@ -172,11 +172,12 @@ public:
//! \return Map with cell indexes as keys and
//! instances as values
std::unordered_map<int32_t, vector<int32_t>> get_contained_cells(
int32_t instance = 0) const;
int32_t instance = 0, Position* hint = nullptr) const;
protected:
//! Determine the path to this cell instance in the geometry hierarchy
vector<ParentCell> find_parent_cells(int32_t instance) const;
vector<ParentCell> find_parent_cells(
int32_t instance, Position* hint = nullptr) const;
//! Inner function for retrieving contained cells
void get_contained_cells_inner(