This QuadTree library provides efficient spatial querying capabilities for 2D points. It supports various operations such as insertion, and rectangular and circular querying, making it suitable for applications in areas such as gaming, geographical information systems, and real-time simulations.
- Generic Implementation:
QuadTree<T>
works with any data typeT
that implements thePoint
andClone
traits. - Spatial Queries: Supports querying within spatial regions that implement the
Shape
trait (Rect
andCircle
are provided). - Dynamic Operations: Efficiently perform mutating operations without full rebuilds.
- insert
- insert_many
- delete
- pop
- Serde Serialization: Enable the
"serde"
feature to serialize the QuadTree and provided shapes. AQuadTree<T>
will serialize into a sequence of items of typeT
.