Space Partitioning
Space partitioning algorithms in Rust. A work in progress.
Implemented algorithms
QuadTrees
Partitions 2D space into a tree of four segments each. Intersection tests are only
implemented using axis-aligned bounding boxes. The tree is currently implemented using
i32
types only to speed up intersection tests; proper pre-scaling of floating-point data
is therefore required.
The example showcases a ray-box test where a 2D ray is implemented using f32
. It can
be started using
$ cargo run --release --example quadtree
Interval Trees
See Interval Trees on Wikipedia.
$ cargo run --example interval_tree
Usage example:
use ;