jagua_rs/collision_detection/quadtree/
qt_traits.rs

1use crate::geometry::geo_traits::CollidesWith;
2#[cfg(doc)]
3use crate::geometry::primitives::Circle;
4use crate::geometry::primitives::Edge;
5use crate::geometry::primitives::Rect;
6
7/// Common trait for all geometric primitives that can be directly queried in the quadtree
8/// for collisions with the edges of the registered hazards. These include: [Rect], [Edge] and [Circle].
9pub trait QTQueryable: CollidesWith<Edge> + CollidesWith<Rect> {}
10
11// Blanket implementation for any type that satisfies the trait bounds.
12impl<T> QTQueryable for T where T: CollidesWith<Edge> + CollidesWith<Rect> {}