bevy_spatial
from the
distance2d
example, colors the elements in a radius around the mouse.
A bevy plugin to track your entities in spatial indexes and query them.
Currently implemented features:
feature | description |
---|---|
kdtree |
KD-Tree for spatial lookups which is fully recreated. This is ideal for cases where EVERYTHING is moving. |
rstar |
R*-Tree for spatial lookups which is updated or recreated based on a threshold of changes. Ideal when most entities are static. |
Quickstart using the kdtree
feature:
use ;
;
type NNTree = ; // type alias for later
fn
For more details on usage see Examples
comaptible bey versions
bevy | bevy_spatial |
---|---|
0.7 | 0.1.0 |
TODOs and Ideas
-
benchmarks
-
documentation
-
a feature for
linfa_nn
to use their abstractions over kdtree/balltree linear search -
a feature for https://github.com/InstantDomain/instant-distance