[−][src]Struct rust_3d::BoundingBox3D
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]
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 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]
It3D: IntoIterator<Item = P>,
P: Is3D + Sized,
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]
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
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]
P: Is3D,
Returns the distance to another Is3D
pub fn sqr_distance<P>(&self, other: &P) -> NonNegative where
P: Is3D,
[src]
P: Is3D,
Returns the square distance to another Is3D
Trait Implementations
impl Clone for BoundingBox3D
[src]
fn clone(&self) -> BoundingBox3D
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BoundingBox3D
[src]
impl Default for BoundingBox3D
[src]
impl Eq for BoundingBox3D
[src]
impl From<BoundingBox3D> for Box3D
[src]
fn from(x: BoundingBox3D) -> Self
[src]
impl From<BoundingBox3D> for FilterBox3D
[src]
fn from(x: BoundingBox3D) -> Self
[src]
impl HasBoundingBox3D for BoundingBox3D
[src]
fn bounding_box(&self) -> BoundingBox3D
[src]
impl HasBoundingBox3DMaybe for BoundingBox3D
[src]
fn bounding_box_maybe(&self) -> Result<BoundingBox3D>
[src]
impl HasDistanceTo<BoundingBox3D> for BoundingBox3D
[src]
fn sqr_distance(&self, other: &BoundingBox3D) -> NonNegative
[src]
fn distance(&self, other: &T) -> NonNegative
[src]
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,
impl Is3D for BoundingBox3D
[src]
fn x(&self) -> f64
[src]
fn y(&self) -> f64
[src]
fn z(&self) -> f64
[src]
fn xyz(&self) -> [f64; 3]
[src]
fn xy(&self) -> [f64; 2]
[src]
fn xz(&self) -> [f64; 2]
[src]
fn yz(&self) -> [f64; 2]
[src]
fn dot(&self, other: &dyn Is3D) -> f64
[src]
fn abs(&self) -> NonNegative
[src]
fn rad_to(&self, other: &dyn Is3D) -> Result<Rad>
[src]
fn to_str(&self) -> String
[src]
impl IsMergeable for BoundingBox3D
[src]
impl IsMovable3D for BoundingBox3D
[src]
impl IsND for BoundingBox3D
[src]
fn n_dimensions() -> usize
[src]
fn position_nd(&self, dimension: usize) -> Result<f64>
[src]
impl IsSATObject for BoundingBox3D
[src]
fn for_each_point<F>(&self, f: &mut F) where
F: FnMut(&Point3D),
[src]
F: FnMut(&Point3D),
fn for_each_axis<F>(&self, f: &mut F) where
F: FnMut(&Norm3D),
[src]
F: FnMut(&Norm3D),
impl IsScalable for BoundingBox3D
[src]
impl Ord for BoundingBox3D
[src]
fn cmp(&self, other: &BoundingBox3D) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<BoundingBox3D> for BoundingBox3D
[src]
fn eq(&self, other: &BoundingBox3D) -> bool
[src]
fn ne(&self, other: &BoundingBox3D) -> bool
[src]
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 StructuralEq for BoundingBox3D
[src]
impl StructuralPartialEq for BoundingBox3D
[src]
Auto Trait Implementations
impl RefUnwindSafe for BoundingBox3D
impl Send for BoundingBox3D
impl Sync for BoundingBox3D
impl Unpin for BoundingBox3D
impl UnwindSafe for BoundingBox3D
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,