[][src]Struct rust_3d::BoundingBox3D

pub struct BoundingBox3D { /* fields omitted */ }

BoundingBox3D, an axis aligned bounding box within 3D space

Implementations

impl BoundingBox3D[src]

pub fn new<P1, P2>(min: &P1, max: &P2) -> Result<BoundingBox3D> where
    P1: Is3D,
    P2: Is3D
[src]

Creates a new BoundingBox3D with the given min and max positions

pub fn from_iterator<'a, It3D, P>(source: It3D) -> Result<BoundingBox3D> where
    It3D: IntoIterator<Item = &'a P>,
    P: 'a + Is3D + Sized
[src]

Creates a new BoundingBox3D which contains all the given positions

pub fn from_into_iterator<It3D, P>(source: It3D) -> Result<BoundingBox3D> where
    It3D: IntoIterator<Item = P>,
    P: Is3D + Sized
[src]

Creates a new BoundingBox3D which contains all the given positions

pub fn min_p(&self) -> Point3D[src]

Returns the minimum position of the bounding box

pub fn max_p(&self) -> Point3D[src]

Returns the maximum position of the bounding box

pub fn size_x(&self) -> Positive[src]

Returns the size the bounding box within the x-dimension

pub fn size_y(&self) -> Positive[src]

Returns the size the bounding box within the y-dimension

pub fn size_z(&self) -> Positive[src]

Returns the size the bounding box within the z-dimension

pub fn sizes(&self) -> [Positive; 3][src]

Returns the sizes of the bounding box

pub fn center_bb(&self) -> Point3D[src]

Returns the center of the bounding box

pub fn is_inside(&self, other: &BoundingBox3D) -> bool[src]

Tests whether this bounding box is within the other

pub fn contains<P>(&self, other: &P) -> bool where
    Self: Sized,
    P: Is3D
[src]

Tests whether this bounding box contains a position

pub fn has_inside(&self, other: &BoundingBox3D) -> bool[src]

Tests whether this bounding box contains the other

pub fn collides_with(&self, other: &BoundingBox3D) -> bool[src]

Tests whether this bounding box and the other overlap in any way

pub fn crossing_x_value(&self, x: f64) -> bool[src]

Tests whether this bounding box crosses a certain x value

pub fn crossing_y_value(&self, y: f64) -> bool[src]

Tests whether this bounding box crosses a certain y value

pub fn crossing_z_value(&self, z: f64) -> bool[src]

Tests whether this bounding box crosses a certain z value

pub fn corners(&self) -> [Point3D; 8][src]

Returns the corner points of the bounding box

pub fn distance<P>(&self, other: &P) -> NonNegative where
    P: Is3D
[src]

Returns the distance to another Is3D

pub fn sqr_distance<P>(&self, other: &P) -> NonNegative where
    P: Is3D
[src]

Returns the square distance to another Is3D

Trait Implementations

impl Clone for BoundingBox3D[src]

impl Debug for BoundingBox3D[src]

impl Default for BoundingBox3D[src]

impl Eq for BoundingBox3D[src]

impl From<BoundingBox3D> for Box3D[src]

impl From<BoundingBox3D> for FilterBox3D[src]

impl HasBoundingBox3D for BoundingBox3D[src]

impl HasBoundingBox3DMaybe for BoundingBox3D[src]

impl HasDistanceTo<BoundingBox3D> for BoundingBox3D[src]

impl Hash for BoundingBox3D[src]

impl Is3D for BoundingBox3D[src]

impl IsMergeable for BoundingBox3D[src]

impl IsMovable3D for BoundingBox3D[src]

impl IsND for BoundingBox3D[src]

impl IsSATObject for BoundingBox3D[src]

impl IsScalable for BoundingBox3D[src]

impl Ord for BoundingBox3D[src]

impl PartialEq<BoundingBox3D> for BoundingBox3D[src]

impl PartialOrd<BoundingBox3D> for BoundingBox3D[src]

impl StructuralEq for BoundingBox3D[src]

impl StructuralPartialEq for BoundingBox3D[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> 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.