Struct tessellation::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<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>