[−][src]Struct mvt::BBox
A bounding box is an axis-aligned rectangle.
It is defined by two corners: north_west and south_east.
Example
use mvt::{BBox, Vec2}; let north_west = Vec2::new(-10.0, 0.0); let south_east = Vec2::new(10.0, 8.0); let bbox = BBox::new(north_west, south_east);
Implementations
impl BBox
[src]
pub fn new(north_west: Vec2, south_east: Vec2) -> Self
[src]
Create a new bounding box.
north_west
The north-west (top-left) corner of the bounds.south_east
The south-east (bottom-right) corner of the bounds.
pub fn x_min(&self) -> f64
[src]
Get the minimum X value.
pub fn x_max(&self) -> f64
[src]
Get the maximum X value.
pub fn y_min(&self) -> f64
[src]
Get the minimum Y value.
pub fn y_max(&self) -> f64
[src]
Get the maximum Y value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BBox
impl Send for BBox
impl Sync for BBox
impl Unpin for BBox
impl UnwindSafe for BBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,