[][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;
use pointy::Pt64;

let north_west = Pt64(-10.0, 0.0);
let south_east = Pt64(10.0, 8.0);
let bbox = BBox::new(north_west, south_east);

Implementations

impl BBox[src]

pub fn new(north_west: Pt64, south_east: Pt64) -> 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]

impl Copy for BBox[src]

impl Debug for BBox[src]

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]

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

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

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

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