THST
THST copied to clipboard
QuadTree min/max?
I don't really understand the min/max constructor parameters for QuadTree. Does it indicate the maximum boundaries for any bbox inserted into the tree? The RTree has no such parameters.
Compared to the RTree which computes the bounding box dynamically, the QuadTree needs a world bounding box that will be used for subdivision (so that it can create the nodes).
Cool, thanks for answering so quickly! A few follow up questions:
- What happens if a bbox is added to the tree that falls outside of the initiql min/max passed to the constructor?
- Does it make sense to pass
-std:: numeric_limits<float>::max()-std:: numeric_limits<float>::max()as a catch-all construction?
- It will asset and not add the item.
- No, in that case it makes you'll have many empty nodes and a high tree depth, which will result in very slow queries, in those cases it's best to split the world into a box grid with multiple quad/rtrees and do a neighbor search.