use aabb::prelude::*;
fn main() {
let mut tree = AABB::with_capacity(4);
tree.add(0.0, 0.0, 2.0, 2.0); tree.add(1.0, 1.0, 3.0, 3.0); tree.add(4.0, 4.0, 5.0, 5.0); tree.add(1.5, 1.5, 2.5, 2.5); tree.build();
let mut results = Vec::new();
tree.query_intersecting_id(0, &mut results).unwrap();
println!("Boxes intersecting with item 0: {:?}", results);
assert_eq!(results.len(), 2, "Expected 2 intersecting boxes");
assert!(results.contains(&1), "Box 1 should intersect with box 0");
assert!(results.contains(&3), "Box 3 should intersect with box 0");
assert!(!results.contains(&0), "Box 0 should not include itself");
assert!(!results.contains(&2), "Box 2 should not intersect with box 0");
println!("✓ All assertions passed!");
}