Crates.io | quadtree |
lib.rs | quadtree |
version | 0.4.0 |
created_at | 2024-08-05 02:12:02.697043+00 |
updated_at | 2025-07-06 22:32:57.460129+00 |
description | A generic quadtree implementation |
homepage | |
repository | https://github.com/benbaarber/quadtree |
max_upload_size | |
id | 1325412 |
size | 64,317 |
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.
Quadtree<T>
works with any data type T
that
implements the Point
and Clone
traits.Shape
trait (Rect
and Circle
are provided).BHQuadtree
is provided for Barnes-Hut
approximation of
n-body simulations. An interactive explanation of this algorithm can be found
here. This implementation is heavily
inspired by DeadlockCode's Barnes-Hut
implementation."serde"
feature to serialize the
Quadtree and provided shapes. A Quadtree<T>
will serialize into a sequence of
items of type T
.