Struct zeno::Bounds [−][src]
Axis-aligned bounding box.
Fields
min: Point
max: 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]
I: IntoIterator,
I::Item: Borrow<Point>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,