[][src]Struct mvt::BBox

pub struct BBox { /* fields omitted */ }

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 Clone for BBox[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for BBox[src]

impl Debug for BBox[src]

Auto Trait Implementations

impl Send for BBox

impl Sync for BBox

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.