[][src]Struct rpt::BoundingBox

pub struct BoundingBox {
    pub p_min: DVec3,
    pub p_max: DVec3,
}

A 3D axis-aligned bounding box

Fields

p_min: DVec3

The coordinates (x_min, y_min, z_min)

p_max: DVec3

The coordinates (x_max, y_max, z_max)

Implementations

impl BoundingBox[src]

pub fn merge(&self, other: &BoundingBox) -> BoundingBox[src]

Combine two bounding boxes together, to form their union

pub fn intersect(&self, ray: &Ray) -> (f64, f64)[src]

Returns the minimum and maximum times of intersection with a ray

pub fn split(&self, axis: usize, value: f64) -> (BoundingBox, BoundingBox)[src]

Splits the bounding box with respect to a plane

Trait Implementations

impl Clone for BoundingBox[src]

impl Copy for BoundingBox[src]

impl Debug for BoundingBox[src]

impl Default for BoundingBox[src]

Auto Trait Implementations

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> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,