Struct vek::geom::repr_c::Aabb [] [src]

pub struct Aabb<T> {
    pub min: Vec3<T>,
    pub max: Vec3<T>,
}

Axis-aligned Bounding Box (3D), represented by min and max points.

N.B: You are responsible for ensuring that all respective elements of min are indeed less than or equal to those of max.
The is_valid(), make_valid() and made_valid() methods are designed to help you with this.

Fields

Minimum coordinates of bounds.

Maximum coordinates of bounds.

Methods

impl<T> Aabb<T>
[src]

[src]

Is this bounding shape valid ? True only if all elements of self.min are less than or equal to those of self.max.

[src]

Makes this bounding shape valid by swapping elements of self.min with self.max as needed.

[src]

Returns this bounding shape made valid by swapping elements of self.min with self.max as needed.

[src]

Creates a new bounding shape from a single point.

[src]

Converts this bounding shape to the matching rectangle representation.

[src]

Gets this bounding shape's center.

[src]

Gets this bounding shape's total size.

[src]

Gets this bounding shape's half size.

[src]

Gets the smallest bounding shape that contains both this one and another.

[src]

Gets the largest bounding shape contained by both this one and another.

[src]

Sets this bounding shape to the union of itself with another.

[src]

Sets this bounding shape to the intersection of itself with another.

[src]

Gets a copy of this shape so that it contains the given point.

[src]

Expands this shape so that it contains the given point.

[src]

Does this bounding shape contain the given point ?

[src]

Does this bounding shape fully contain another ?

[src]

Does this bounding shape collide with another ?

[src]

Gets a vector that tells how much self penetrates other.

[src]

Splits this shape in two, by a straight plane along the axis.
The returned tuple is (low, high).

Panics

sp is assumed to be a position along the axis that is within this shape's bounds.

[src]

Splits this shape in two, by a straight plane along the axis.
The returned tuple is (low, high).

Panics

sp is assumed to be a position along the axis that is within this shape's bounds.

[src]

Splits this shape in two, by a straight plane along the axis.
The returned tuple is (low, high).

Panics

sp is assumed to be a position along the axis that is within this shape's bounds.

[src]

Returns this bounding shape, converted element-wise using the given closure.

Trait Implementations

impl<T> From<Rect3<T, T>> for Aabb<T> where
    T: Copy + Add<T, Output = T>, 
[src]

[src]

Performs the conversion.

impl<T: Debug> Debug for Aabb<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Default> Default for Aabb<T>
[src]

[src]

Returns the "default value" for a type. Read more

impl<T: Clone> Clone for Aabb<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for Aabb<T>
[src]

impl<T: Hash> Hash for Aabb<T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Eq> Eq for Aabb<T>
[src]

impl<T: PartialEq> PartialEq for Aabb<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.