Expand description
Provides tools for interacting with and creating axis aligned bounding boxes in 2D.
Fields
min: Vector2<f32>
max: Vector2<f32>
Implementations
sourceimpl AABB2D
impl AABB2D
pub const fn new(minx: f32, miny: f32, maxx: f32, maxy: f32) -> AABB2D
pub fn from_min_max(min: Vector2<f32>, max: Vector2<f32>) -> AABB2D
pub fn from_pos_size(pos: Vector2<f32>, size: Vector2<f32>) -> AABB2D
pub fn intersects(&self, other: &AABB2D) -> bool
pub fn contains(&self, other: &AABB2D) -> bool
pub fn contains_point(&self, point: &Vector2<f32>) -> bool
pub fn slide(&mut self, mov: &Vector2<f32>, others: &[AABB2D]) -> bool
Trait Implementations
impl Copy for AABB2D
impl StructuralPartialEq for AABB2D
Auto Trait Implementations
impl RefUnwindSafe for AABB2D
impl Send for AABB2D
impl Sync for AABB2D
impl Unpin for AABB2D
impl UnwindSafe for AABB2D
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more