pub struct Bbox {
pub min: Point,
pub max: Point,
}Fields§
§min: Point§max: PointImplementations§
Source§impl Bbox
impl Bbox
pub const EMPTY: Self
pub const fn new(min: Point, max: Point) -> Self
pub fn from_point(p: Point) -> Self
pub fn is_empty(&self) -> bool
pub fn width(&self) -> i64
pub fn height(&self) -> i64
pub fn contains(&self, p: Point) -> bool
pub fn intersects(&self, other: &Bbox) -> bool
pub fn intersection(&self, other: &Bbox) -> Bbox
pub fn union(&self, other: &Bbox) -> Bbox
pub fn expand_to(&mut self, p: Point)
pub fn corners(&self) -> [Point; 4]
Trait Implementations§
impl Copy for Bbox
impl Eq for Bbox
impl StructuralPartialEq for Bbox
Auto Trait Implementations§
impl Freeze for Bbox
impl RefUnwindSafe for Bbox
impl Send for Bbox
impl Sync for Bbox
impl Unpin for Bbox
impl UnsafeUnpin for Bbox
impl UnwindSafe for Bbox
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