Struct collision::Aabb2 [] [src]

pub struct Aabb2<S> {
    pub min: Point2<S>,
    pub max: Point2<S>,
}

A two-dimensional AABB, aka a rectangle.

Fields

Methods

impl<S: BaseNum> Aabb2<S>
[src]

Construct a new axis-aligned bounding box from two points.

Compute corners.

Trait Implementations

impl<S: Encodable> Encodable for Aabb2<S>
[src]

impl<S: Decodable> Decodable for Aabb2<S>
[src]

impl<S: Copy> Copy for Aabb2<S>
[src]

impl<S: Clone> Clone for Aabb2<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: PartialEq> PartialEq for Aabb2<S>
[src]

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

This method tests for !=.

impl<S: BaseNum> Aabb<S, Vector2<S>, Point2<S>> for Aabb2<S>
[src]

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. Read more

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.

impl<S: BaseNum> Debug for Aabb2<S>
[src]

Formats the value using the given formatter.