pub struct AABB {
pub min: [f64; 2],
pub max: [f64; 2],
}Fields§
§min: [f64; 2]§max: [f64; 2]Implementations§
Source§impl AABB
impl AABB
pub fn new(min: [f64; 2], max: [f64; 2]) -> Self
pub fn from_center(center: [f64; 2], half_extents: [f64; 2]) -> Self
pub fn center(&self) -> [f64; 2]
pub fn half_extents(&self) -> [f64; 2]
pub fn intersects(&self, other: &AABB) -> bool
pub fn contains_point(&self, p: [f64; 2]) -> bool
pub fn contains(&self, other: &AABB) -> bool
pub fn merged(&self, other: &AABB) -> AABB
pub fn area(&self) -> f64
Trait Implementations§
impl Copy for AABB
impl StructuralPartialEq for AABB
Auto Trait Implementations§
impl Freeze for AABB
impl RefUnwindSafe for AABB
impl Send for AABB
impl Sync for AABB
impl Unpin for AABB
impl UnsafeUnpin 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