[−][src]Struct arcs::components::BoundingBox
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]
centre: Vector,
width: f64,
height: f64
) -> Self
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 BoundingBox
es.
pub fn around<I, B>(items: I) -> Option<BoundingBox> where
I: IntoIterator<Item = B>,
B: Bounded,
[src]
I: IntoIterator<Item = B>,
B: Bounded,
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]
fn bounding_box(&self) -> BoundingBox
[src]
impl Clone for BoundingBox
[src]
fn clone(&self) -> BoundingBox
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn eq(&self, other: &BoundingBox) -> bool
[src]
fn ne(&self, other: &BoundingBox) -> bool
[src]
impl StructuralPartialEq for BoundingBox
[src]
Auto Trait Implementations
impl RefUnwindSafe for BoundingBox
impl Send for BoundingBox
impl Sync for BoundingBox
impl Unpin for BoundingBox
impl UnwindSafe for BoundingBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> RoundFrom<T> for T
[src]
fn round_from(x: T) -> T
[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
[src]
U: RoundFrom<T>,
fn round_into(self) -> U
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,