Struct zeno::Bounds[][src]

pub struct Bounds {
    pub min: Point,
    pub max: Point,
}

Axis-aligned bounding box.

Fields

min: Pointmax: Point

Implementations

impl Bounds[src]

pub fn new(min: Point, max: Point) -> Self[src]

Creates a new bounding box from minimum and maximum points.

pub fn from_points<I>(points: I) -> Self where
    I: IntoIterator,
    I::Item: Borrow<Point>, 
[src]

Creates a new bounding box from a sequence of points.

pub fn is_empty(&self) -> bool[src]

Returns true if the bounding box is empty.

pub fn width(&self) -> f32[src]

Returns the width of the bounding box.

pub fn height(&self) -> f32[src]

Returns the height of the bounding box.

pub fn contains(&self, point: impl Into<Point>) -> bool[src]

Returns true if the box contains the specified point.

Trait Implementations

impl Clone for Bounds[src]

impl Copy for Bounds[src]

impl Debug for Bounds[src]

impl Default for Bounds[src]

Auto Trait Implementations

impl RefUnwindSafe for Bounds

impl Send for Bounds

impl Sync for Bounds

impl Unpin for Bounds

impl UnwindSafe for Bounds

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.