Struct space_partitioning::QuadTree [−][src]
pub struct QuadTree<ElementId = u32> where
ElementId: ElementIdType, { /* fields omitted */ }
Expand description
A QuadTree implementation as described in Efficient Quadtrees.
Remarks
This tree uses integral coordinates only in order to speed up box-box intersection tests.
Implementations
Prunes unused child nodes from the tree.
Remarks
The tree is never pruned automatically for performance reasons. Call this method after all elements were removed or updated.
Returns the set of IDs that occupy space within the specified bounding box.
Arguments
- [
rect
] - The rectangle to test for.
pub fn intersect_generic<T>(&self, element: &T) -> HashSet<ElementId> where
T: IntersectsWith<AABB>,
pub fn intersect_generic<T>(&self, element: &T) -> HashSet<ElementId> where
T: IntersectsWith<AABB>,
Returns the set of IDs that occupy space within the specified bounding box.
Arguments
- [
rect
] - The rectangle to test for.