pub struct AABB {
pub min: Vec2,
pub max: Vec2,
}Fields§
§min: Vec2§max: Vec2Implementations§
source§impl AABB
impl AABB
pub fn new(min: Vec2, max: Vec2) -> AABB
pub fn from_two_points(a: Vec2, b: Vec2) -> AABB
pub fn from_top_left(top_left: Vec2, size: Vec2) -> AABB
pub fn from_center_size(center: Vec2, size: Vec2) -> AABB
pub fn center(&self) -> Vec2
pub fn size(&self) -> Vec2
pub fn contains(&self, point: Vec2) -> bool
pub fn intersects(&self, other: &AABB) -> bool
pub fn expand_to_include_point(&mut self, point: Vec2)
pub fn expand_to_include_aabb(&mut self, other: &AABB)
pub fn top_left(&self) -> Vec2
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for AABB
impl Send for AABB
impl Sync for AABB
impl Unpin for AABB
impl UnwindSafe for AABB
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more