Struct rust_3d::BoundingBox3D
[−]
[src]
pub struct BoundingBox3D { /* fields omitted */ }
BoundingBox3D, an axis aligned bounding box within 3D space
Methods
impl BoundingBox3D
[src]
fn new<P1, P2>(min: &P1, max: &P2) -> Result<BoundingBox3D> where
P1: Is3D,
P2: Is3D,
P1: Is3D,
P2: Is3D,
Creates a new BoundingBox3D with the given min and max positions
fn from_iterator<'a, It3D, P>(source: It3D) -> Result<BoundingBox3D> where
It3D: IntoIterator<Item = &'a Box<P>>,
P: 'a + Is3D + Sized,
It3D: IntoIterator<Item = &'a Box<P>>,
P: 'a + Is3D + Sized,
Creates a new BoundBox3D which contains all the given positions
fn min_p(&self) -> Point3D
Returns the minimum position of the bounding box
fn max_p(&self) -> Point3D
Returns the maximum position of the bounding box
fn size_x(&self) -> Positive
Returns the size the bounding box within the x-dimension
fn size_y(&self) -> Positive
Returns the size the bounding box within the y-dimension
fn size_z(&self) -> Positive
Returns the size the bounding box within the z-dimension
fn center_bb(&self) -> Point3D
Returns the center of the bounding box
fn is_inside(&self, other: &BoundingBox3D) -> bool
Tests whether this bounding box is within the other
fn contains<P>(&self, other: &P) -> bool where
Self: Sized,
P: Is3D,
Self: Sized,
P: Is3D,
Tests whether this bounding box contains a position
fn has_inside(&self, other: &BoundingBox3D) -> bool
Tests whether this bounding box contains the other
fn collides_with(&self, other: &BoundingBox3D) -> bool
Tests whether this bounding box and the other overlap in any way
Trait Implementations
impl Debug for BoundingBox3D
[src]
impl Clone for BoundingBox3D
[src]
fn clone(&self) -> BoundingBox3D
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for BoundingBox3D
[src]
fn eq(&self, __arg_0: &BoundingBox3D) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BoundingBox3D) -> bool
This method tests for !=
.
impl Eq for BoundingBox3D
[src]
impl PartialOrd for BoundingBox3D
[src]
fn partial_cmp(&self, __arg_0: &BoundingBox3D) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &BoundingBox3D) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &BoundingBox3D) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &BoundingBox3D) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &BoundingBox3D) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for BoundingBox3D
[src]
fn cmp(&self, __arg_0: &BoundingBox3D) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl Hash for BoundingBox3D
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl HasBoundingBox3D for BoundingBox3D
[src]
fn bounding_box(&self) -> Result<BoundingBox3D>
Should return the bounding box as a pair of two points. The first point should be the minimum for all coordinates, the second the maximum for all coordinates
impl HasDistanceTo<BoundingBox3D> for BoundingBox3D
[src]
fn sqr_distance(&self, other: &BoundingBox3D) -> NonNegative
Should return the sqr distance to other
fn distance(&self, other: &T) -> NonNegative
The distance to other