[][src]Struct box2d_rs::b2_collision::B2AABB

pub struct B2AABB {
    pub lower_bound: B2vec2,
    pub upper_bound: B2vec2,
}

An axis aligned bounding box.

Fields

lower_bound: B2vec2

< the lower vertex

upper_bound: B2vec2

< the upper vertex

Implementations

impl B2AABB[src]

pub fn is_valid(self) -> bool[src]

Verify that the bounds are sorted.

pub fn get_center(self) -> B2vec2[src]

Get the center of the AABB.

pub fn get_extents(self) -> B2vec2[src]

Get the extents of the AABB (half-widths).

pub fn get_perimeter(self) -> f32[src]

Get the perimeter length

pub fn combine(&mut self, aabb: B2AABB)[src]

Combine an AABB into this one.

pub fn combine_two(&mut self, aabb1: B2AABB, aabb2: B2AABB)[src]

Combine two AABBs into this one.

pub fn contains(self, aabb: &B2AABB) -> bool[src]

Does this aabb contain the provided AABB.

pub fn ray_cast(
    self,
    output: &mut B2rayCastOutput,
    input: &B2rayCastInput
) -> bool
[src]

Trait Implementations

impl Clone for B2AABB[src]

impl Copy for B2AABB[src]

impl Debug for B2AABB[src]

impl Default for B2AABB[src]

Auto Trait Implementations

impl RefUnwindSafe for B2AABB

impl Send for B2AABB

impl Sync for B2AABB

impl Unpin for B2AABB

impl UnwindSafe for B2AABB

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.