Struct collision::Aabb2 [] [src]

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

A two-dimensional AABB, aka a rectangle.

Fields

Minimum point of the AABB

Maximum point of the AABB

Methods

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

[src]

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

[src]

Compute corners.

Trait Implementations

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

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

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

[src]

This method tests for !=.

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

Scalar type

Vector type

Point type

[src]

Create a new AABB using two points as opposing corners.

[src]

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

[src]

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

[src]

Add a margin of the given width around the AABB, returning a new AABB.

[src]

Apply an arbitrary transform to the corners of this bounding box, return a new conservative bound. Read more

[src]

Create a new empty AABB

[src]

Return the dimensions of this AABB.

[src]

Return the volume this AABB encloses.

[src]

Return the center point of this AABB.

[src]

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

[src]

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

[src]

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

[src]

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

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

[src]

Formats the value using the given formatter.

impl<S: BaseNum> Contains<Point2<S>> for Aabb2<S>
[src]

[src]

Containment test

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

[src]

Containment test

impl<S: BaseNum> Contains<Line2<S>> for Aabb2<S>
[src]

[src]

Containment test

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

Union shape created

[src]

Build the union shape of self and the given shape.

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

Result type returned from surface area computation

[src]

Compute surface area

impl<S: BaseFloat> Continuous<Ray2<S>> for Aabb2<S>
[src]

Result returned by the intersection test

[src]

Intersection test

impl<S: BaseFloat> Discrete<Ray2<S>> for Aabb2<S>
[src]

[src]

Intersection test

impl<S: BaseFloat> Discrete<Aabb2<S>> for Aabb2<S>
[src]

[src]

Intersection test