pub struct Aabb {
pub min_x: i64,
pub min_y: i64,
pub max_x: i64,
pub max_y: i64,
}Fields§
§min_x: i64§min_y: i64§max_x: i64§max_y: i64Implementations§
Source§impl Aabb
impl Aabb
pub fn new(min_x: i64, min_y: i64, max_x: i64, max_y: i64) -> Self
pub fn from_ring(ring: &[[i64; 2]]) -> Self
pub fn intersects(&self, other: &Aabb) -> bool
pub fn contains_point(&self, x: i64, y: i64) -> bool
pub fn merge(&self, other: &Aabb) -> Aabb
pub fn width(&self) -> i64
pub fn height(&self) -> i64
Trait Implementations§
impl Copy for Aabb
impl Eq 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