Struct implicit3d::BoundingBox [−][src]
3D Bounding Box - defined by two diagonally opposing points.
Fields
min: Point<S, U3>
X-Y-Z-Minimum corner of the box.
max: Point<S, U3>
X-Y-Z-Maximum corner of the box.
Methods
impl<S> BoundingBox<S> where
S: Real + Float,
[src]
impl<S> BoundingBox<S> where
S: Real + Float,
pub fn infinity() -> BoundingBox<S>
[src]
pub fn infinity() -> BoundingBox<S>
Returns an infinte sized box.
pub fn neg_infinity() -> BoundingBox<S>
[src]
pub fn neg_infinity() -> BoundingBox<S>
Returns a negatively infinte sized box.
pub fn new(a: &Point<S, U3>, b: &Point<S, U3>) -> BoundingBox<S>
[src]
pub fn new(a: &Point<S, U3>, b: &Point<S, U3>) -> BoundingBox<S>
Create a new Bounding Box by supplying two points.
pub fn union(&self, other: &BoundingBox<S>) -> BoundingBox<S>
[src]
pub fn union(&self, other: &BoundingBox<S>) -> BoundingBox<S>
Create a CSG Union of two Bounding Boxes.
pub fn intersection(&self, other: &BoundingBox<S>) -> BoundingBox<S>
[src]
pub fn intersection(&self, other: &BoundingBox<S>) -> BoundingBox<S>
Create a CSG Intersection of two Bounding Boxes.
pub fn transform<M>(&self, mat: &M) -> BoundingBox<S> where
M: Transformation<Point<S, U3>>,
[src]
pub fn transform<M>(&self, mat: &M) -> BoundingBox<S> where
M: Transformation<Point<S, U3>>,
Transform a Bounding Box - resulting in a enclosing axis aligned Bounding Box.
pub fn dilate(&mut self, d: S) -> &mut BoundingBox<S>
[src]
pub fn dilate(&mut self, d: S) -> &mut BoundingBox<S>
Dilate a Bounding Box by some amount in all directions.
pub fn insert(&mut self, o: &Point<S, U3>) -> &mut BoundingBox<S>
[src]
pub fn insert(&mut self, o: &Point<S, U3>) -> &mut BoundingBox<S>
Add a Point to a Bounding Box, e.g. expand the Bounding Box to contain that point.
pub fn dim(
&self
) -> Matrix<S, U3, U1, <DefaultAllocator as Allocator<S, U3, U1>>::Buffer>
[src]
pub fn dim(
&self
) -> Matrix<S, U3, U1, <DefaultAllocator as Allocator<S, U3, U1>>::Buffer>
Return the size of the Box.
pub fn distance(&self, p: &Point<S, U3>) -> S
[src]
pub fn distance(&self, p: &Point<S, U3>) -> S
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: &Point<S, U3>) -> bool
[src]
pub fn contains(&self, p: &Point<S, U3>) -> bool
Return true if the Bounding Box contains p.
Trait Implementations
impl<T> AbsDiffEq for BoundingBox<T> where
T: Real + Float + AbsDiffEq,
<T as AbsDiffEq>::Epsilon: Copy,
[src]
impl<T> AbsDiffEq for BoundingBox<T> where
T: Real + Float + AbsDiffEq,
<T as AbsDiffEq>::Epsilon: Copy,
type Epsilon = <T as AbsDiffEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <BoundingBox<T> as AbsDiffEq>::Epsilon
[src]
fn default_epsilon() -> <BoundingBox<T> as AbsDiffEq>::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn abs_diff_eq(
&self,
other: &BoundingBox<T>,
epsilon: <BoundingBox<T> as AbsDiffEq>::Epsilon
) -> bool
[src]
fn abs_diff_eq(
&self,
other: &BoundingBox<T>,
epsilon: <BoundingBox<T> as AbsDiffEq>::Epsilon
) -> bool
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Self, epsilon: Self::Epsilon) -> bool
The inverse of ApproxEq::abs_diff_eq
.
impl<T> RelativeEq for BoundingBox<T> where
T: Real + Float + RelativeEq,
<T as AbsDiffEq>::Epsilon: Copy,
[src]
impl<T> RelativeEq for BoundingBox<T> where
T: Real + Float + RelativeEq,
<T as AbsDiffEq>::Epsilon: Copy,
fn default_max_relative() -> <T as AbsDiffEq>::Epsilon
[src]
fn default_max_relative() -> <T as AbsDiffEq>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &BoundingBox<T>,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon
) -> bool
[src]
fn relative_eq(
&self,
other: &BoundingBox<T>,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
impl<S> Clone for BoundingBox<S> where
S: Clone + Debug + Real,
[src]
impl<S> Clone for BoundingBox<S> where
S: Clone + Debug + Real,
fn clone(&self) -> BoundingBox<S>
[src]
fn clone(&self) -> BoundingBox<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<S> Debug for BoundingBox<S> where
S: Debug + Debug + Real,
[src]
impl<S> Debug for BoundingBox<S> where
S: Debug + Debug + Real,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<S> PartialEq<BoundingBox<S>> for BoundingBox<S> where
S: PartialEq<S> + Debug + Real,
[src]
impl<S> PartialEq<BoundingBox<S>> for BoundingBox<S> where
S: PartialEq<S> + Debug + Real,
fn eq(&self, other: &BoundingBox<S>) -> bool
[src]
fn eq(&self, other: &BoundingBox<S>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &BoundingBox<S>) -> bool
[src]
fn ne(&self, other: &BoundingBox<S>) -> bool
This method tests for !=
.
Auto Trait Implementations
impl<S> Send for BoundingBox<S>
impl<S> Send for BoundingBox<S>
impl<S> Sync for BoundingBox<S>
impl<S> Sync for BoundingBox<S>