bevy_spatial
A bevy plugin to track your entities in spatial indices and query them.
NOTE: You will need to enable at least one of the features.
Currently implemented features:
Feature | Description |
---|---|
kdtree |
KD-Tree for spatial lookups which is fully recreated. This is ideal for cases where most entities are moving. |
rstar |
R*-Tree for spatial lookups which is updated or recreated based on a threshold of changed entities. Ideal when most entities are static. |
Quickstart using the kdtree
feature:
use ;
;
type NNTree = ; // type alias for brevity
For more details on usage see Examples
compatible bevy versions
bevy | bevy_spatial |
---|---|
0.8 | 0.2 |
0.7 | 0.1 |
TODOs and Ideas
-
benchmarks
-
documentation
-
Versions of the SpatialAccess functions which return Iterators instead of Vecs
-
a feature for
linfa_nn
to use their abstractions over kdtree/balltree linear search -
a feature for https://github.com/InstantDomain/instant-distance