[][src]Struct arcs::components::BoundingBox

pub struct BoundingBox { /* fields omitted */ }

An axis-aligned bounding box.

Methods

impl BoundingBox[src]

pub fn new(first: Vector, second: Vector) -> Self[src]

Create a new BoundingBox around two points.

pub fn new_unchecked(bottom_left: Vector, top_right: Vector) -> Self[src]

Create a new BoundingBox without ensuring the bottom-left and top-right corners are actually in the bottom-left and top-right.

pub fn from_centre_and_dimensions(
    centre: Vector,
    width: f64,
    height: f64
) -> Self
[src]

pub fn width(self) -> f64[src]

pub fn height(self) -> f64[src]

pub fn area(self) -> f64[src]

pub fn diagonal(self) -> Vector[src]

pub fn merge(left: BoundingBox, right: BoundingBox) -> BoundingBox[src]

Merge two BoundingBoxes.

pub fn around<I, B>(items: I) -> Option<BoundingBox> where
    I: IntoIterator<Item = B>,
    B: Bounded
[src]

pub fn bottom_left(self) -> Vector[src]

pub fn bottom_right(self) -> Vector[src]

pub fn top_right(self) -> Vector[src]

pub fn top_left(self) -> Vector[src]

pub fn min_x(self) -> f64[src]

pub fn min_y(self) -> f64[src]

pub fn max_x(self) -> f64[src]

pub fn max_y(self) -> f64[src]

pub fn fully_contains(self, other: BoundingBox) -> bool[src]

pub fn intersects_with(&self, other: BoundingBox) -> bool[src]

Trait Implementations

impl Bounded for BoundingBox[src]

impl Clone for BoundingBox[src]

impl Component for BoundingBox[src]

type Storage = DenseVecStorage<Self>

Associated storage type for this component.

impl Copy for BoundingBox[src]

impl Debug for BoundingBox[src]

impl PartialEq<BoundingBox> for BoundingBox[src]

impl StructuralPartialEq for BoundingBox[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

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

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<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.