10 releases

0.3.5 Aug 12, 2024
0.3.4 Aug 11, 2024
0.2.1 Aug 6, 2024
0.1.1 Aug 5, 2024

#79 in Simulation

Download history 598/week @ 2024-08-05 183/week @ 2024-08-12 1/week @ 2024-08-26 24/week @ 2024-09-16 33/week @ 2024-09-23 17/week @ 2024-09-30 67/week @ 2024-10-28 80/week @ 2024-11-04

147 downloads per month

MIT license

52KB
1.5K SLoC

QuadTree

Current Crates.io Version Documentation

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.

Features

  • Generic Implementation: QuadTree<T> works with any data type T that implements the Point and Clone traits.
  • Spatial Queries: Supports querying within spatial regions that implement the Shape trait (Rect and Circle 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. A QuadTree<T> will serialize into a sequence of items of type T.

Dependencies

~3MB
~60K SLoC