[][src]Struct ultraviolet::geometry::Aabb

#[repr(C)]pub struct Aabb {
    pub min: Vec3,
    pub max: Vec3,
}

An axis-aligned bounding box

Fields

min: Vec3max: Vec3

Methods

impl Aabb[src]

#[must_use]pub fn iter(&self) -> AabbLinearIterator[src]

Same as iter_stride, but calls it with a stride of 1.0

impl Aabb[src]

#[must_use]pub fn new(min: Vec3, max: Vec3) -> Self[src]

Creates a new axis-aligned bounding box.

min must be less than or equal to max. This is not checked by the library, but will result in bad results and/or unsigned integer underflow if it is not held.

#[must_use]pub fn contains(&self, target: Vec3) -> bool[src]

#[must_use]pub fn intersects(&self, other: &Self) -> bool[src]

#[must_use]pub fn size(&self) -> Vec3[src]

#[must_use]pub fn volume(&self) -> f32[src]

#[must_use]pub fn iter_stride(&self, stride: f32) -> AabbLinearIterator[src]

Trait Implementations

impl Clone for Aabb[src]

impl Copy for Aabb[src]

impl Debug for Aabb[src]

impl Default for Aabb[src]

Auto Trait Implementations

impl RefUnwindSafe for Aabb

impl Send for Aabb

impl Sync for Aabb

impl Unpin for Aabb

impl UnwindSafe for Aabb

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.