[−][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);
Methods
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
impl Copy for BBox
[src]
impl Clone for BBox
[src]
fn clone(&self) -> BBox
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for BBox
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,