Trait collision::Aabb [] [src]

pub trait Aabb<S: BaseNum, V: VectorSpace<Scalar=S> + ElementWise + Array<Element=S>, P: EuclideanSpace<Scalar=S, Diff=V>>: Sized {
    fn new(p1: P, p2: P) -> Self;
    fn min(&self) -> P;
    fn max(&self) -> P;
    fn contains(&self, p: P) -> bool;

    fn dim(&self) -> V { ... }
    fn volume(&self) -> S { ... }
    fn center(&self) -> P { ... }
    fn grow(&self, p: P) -> Self where P: MinMax { ... }
    fn add_v(&self, v: V) -> Self { ... }
    fn mul_s(&self, s: S) -> Self { ... }
    fn mul_v(&self, v: V) -> Self { ... }
}

Required Methods

Create a new AABB using two points as opposing corners.

Return a shared reference to the point nearest to (-inf, -inf).

Return a shared reference to the point nearest to (inf, inf).

Tests whether a point is cointained in the box, inclusive for min corner and exclusive for the max corner.

Provided Methods

Return the dimensions of this AABB.

Return the volume this AABB encloses.

Return the center point of this AABB.

Returns a new AABB that is grown to include the given point.

Add a vector to every point in the AABB, returning a new AABB.

Multiply every point in the AABB by a scalar, returning a new AABB.

Multiply every point in the AABB by a vector, returning a new AABB.

Implementors