[−][src]Struct bbox::BoundingBox
3D Bounding Box - defined by two diagonally opposing points.
Fields
min: Point3<S>
X-Y-Z-Minimum corner of the box.
max: Point3<S>
X-Y-Z-Maximum corner of the box.
Implementations
impl<S: Float + Debug + RealField + RealField> BoundingBox<S>
[src]
pub fn infinity() -> BoundingBox<S>
[src]
Returns an infinte sized box.
pub fn neg_infinity() -> BoundingBox<S>
[src]
Returns a negatively infinte sized box.
pub fn new(a: &Point3<S>, b: &Point3<S>) -> BoundingBox<S>
[src]
Create a new Bounding Box by supplying two points.
pub fn union(&self, other: &BoundingBox<S>) -> BoundingBox<S>
[src]
Create a CSG Union of two Bounding Boxes.
pub fn intersection(&self, other: &BoundingBox<S>) -> BoundingBox<S>
[src]
Create a CSG Intersection of two Bounding Boxes.
pub fn transform(&self, mat: &Matrix4<S>) -> BoundingBox<S>
[src]
Transform a Bounding Box - resulting in a enclosing axis aligned Bounding Box.
pub fn dilate(&mut self, d: S) -> &mut Self
[src]
Dilate a Bounding Box by some amount in all directions.
pub fn insert(&mut self, o: &Point3<S>) -> &mut Self
[src]
Add a Point to a Bounding Box, e.g. expand the Bounding Box to contain that point.
pub fn dim(&self) -> Vector3<S>
[src]
Return the size of the Box.
pub fn distance(&self, p: &Point3<S>) -> S
[src]
Returns the approximate distance of p to the box. The result is guarateed to be not less than the euclidean distance of p to the box.
pub fn contains(&self, p: &Point3<S>) -> bool
[src]
Return true if the Bounding Box contains p.
Trait Implementations
impl<T: Float> AbsDiffEq<BoundingBox<T>> for BoundingBox<T> where
<T as AbsDiffEq>::Epsilon: Copy,
T: AbsDiffEq + Debug,
[src]
<T as AbsDiffEq>::Epsilon: Copy,
T: AbsDiffEq + Debug,
type Epsilon = <T as AbsDiffEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
impl<S: Clone + 'static + Debug + Copy + PartialEq> Clone for BoundingBox<S>
[src]
fn clone(&self) -> BoundingBox<S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug + 'static + Copy + PartialEq> Debug for BoundingBox<S>
[src]
impl<S: PartialEq + 'static + Debug + Copy> PartialEq<BoundingBox<S>> for BoundingBox<S>
[src]
fn eq(&self, other: &BoundingBox<S>) -> bool
[src]
fn ne(&self, other: &BoundingBox<S>) -> bool
[src]
impl<T: Float> RelativeEq<BoundingBox<T>> for BoundingBox<T> where
<T as AbsDiffEq>::Epsilon: Copy,
T: RelativeEq + Debug,
[src]
<T as AbsDiffEq>::Epsilon: Copy,
T: RelativeEq + Debug,
fn default_max_relative() -> <T as AbsDiffEq>::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon
) -> bool
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl<S: 'static + Debug + Copy + PartialEq> StructuralPartialEq for BoundingBox<S>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for BoundingBox<S> where
S: RefUnwindSafe + Scalar,
S: RefUnwindSafe + Scalar,
impl<S> Send for BoundingBox<S> where
S: Scalar + Send,
S: Scalar + Send,
impl<S> Sync for BoundingBox<S> where
S: Scalar + Sync,
S: Scalar + Sync,
impl<S> Unpin for BoundingBox<S> where
S: Scalar + Unpin,
S: Scalar + Unpin,
impl<S> UnwindSafe for BoundingBox<S> where
S: Scalar + UnwindSafe,
S: Scalar + UnwindSafe,
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> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
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>,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,