[−][src]Struct rust_3d::BoundingBox3D
BoundingBox3D, an axis aligned bounding box within 3D space
Methods
impl BoundingBox3D[src]
pub fn new<P1, P2>(min: &P1, max: &P2) -> Result<BoundingBox3D> where
P1: Is3D,
P2: Is3D, [src]
P1: Is3D,
P2: Is3D,
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]
It3D: IntoIterator<Item = &'a P>,
P: 'a + Is3D + Sized,
Creates a new BoundBox3D 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 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]
Self: Sized,
P: Is3D,
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
Trait Implementations
impl HasBoundingBox3D for BoundingBox3D[src]
fn bounding_box(&self) -> Result<BoundingBox3D>[src]
impl IsScalable for BoundingBox3D[src]
impl IsMergeable for BoundingBox3D[src]
impl HasDistanceTo<BoundingBox3D> for dyn Is3D[src]
fn sqr_distance(&self, other: &BoundingBox3D) -> NonNegative[src]
fn distance(&self, other: &T) -> NonNegative[src]
The distance to other
impl HasDistanceTo<BoundingBox3D> for BoundingBox3D[src]
fn sqr_distance(&self, other: &BoundingBox3D) -> NonNegative[src]
fn distance(&self, other: &T) -> NonNegative[src]
The distance to other
impl PartialOrd<BoundingBox3D> for BoundingBox3D[src]
fn partial_cmp(&self, other: &BoundingBox3D) -> Option<Ordering>[src]
fn lt(&self, other: &BoundingBox3D) -> bool[src]
fn le(&self, other: &BoundingBox3D) -> bool[src]
fn gt(&self, other: &BoundingBox3D) -> bool[src]
fn ge(&self, other: &BoundingBox3D) -> bool[src]
impl PartialEq<BoundingBox3D> for BoundingBox3D[src]
fn eq(&self, other: &BoundingBox3D) -> bool[src]
fn ne(&self, other: &BoundingBox3D) -> bool[src]
impl Ord for BoundingBox3D[src]
fn cmp(&self, other: &BoundingBox3D) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self[src]
clamp)Restrict a value to a certain interval. Read more
impl Eq for BoundingBox3D[src]
impl Default for BoundingBox3D[src]
impl From<BoundingBox3D> for FilterBox3D[src]
fn from(x: BoundingBox3D) -> Self[src]
impl From<BoundingBox3D> for Box3D[src]
fn from(x: BoundingBox3D) -> Self[src]
impl Clone for BoundingBox3D[src]
fn clone(&self) -> BoundingBox3D[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Hash for BoundingBox3D[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for BoundingBox3D[src]
Auto Trait Implementations
impl Send for BoundingBox3D
impl Unpin for BoundingBox3D
impl Sync for BoundingBox3D
impl UnwindSafe for BoundingBox3D
impl RefUnwindSafe for BoundingBox3D
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,