Function box_intersect_ze::intersect_ze [−][src]
pub fn intersect_ze<B, ID, R>(
a: &BBoxSet<B, ID>,
b: &BBoxSet<B, ID>,
out: &mut Vec<(ID, ID)>,
rand: &mut R
) where
B: BBox,
B::Num: PartialOrd + HasInfinity,
ID: PartialOrd + Copy,
R: Rng,
Finds all intersections between boxes in a
and b
using Zomorodian and Edelsbrunner’s
hybrid algorithm (streamed segment trees pruned with a cutoff).
a
andb
may be either the same or distinctBBoxSet
s and must be sorted before calling.out
will contain pairs ofID
s of intersecting boxes. Choose capacity according to the number of intersections you expect to avoid resizing.rand
must be a random number generator implementing theRng
trait. (used for approximate median selection)