Struct geo::Bbox [] [src]

pub struct Bbox<T> where T: Float {
    pub xmin: T,
    pub xmax: T,
    pub ymin: T,
    pub ymax: T,
}

Fields

xmin: T xmax: T ymin: T ymax: T

Trait Implementations

impl<T: Debug> Debug for Bbox<T> where T: Float
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Copy> Copy for Bbox<T> where T: Float
[src]

impl<T: Clone> Clone for Bbox<T> where T: Float
[src]

fn clone(&self) -> Bbox<T>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq for Bbox<T> where T: Float
[src]

fn eq(&self, __arg_0: &Bbox<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Bbox<T>) -> bool

This method tests for !=.

impl<T> Add for Bbox<T> where T: Float + ToPrimitive
[src]

type Output = Bbox<T>

The resulting type after applying the + operator

fn add(self, rhs: Bbox<T>) -> Bbox<T>

Add a boundingox to the given boundingbox.

use geo::Bbox;

let bbox0 = Bbox{xmin: 0.,  xmax: 10000., ymin: 10., ymax: 100.};
let bbox1 = Bbox{xmin: 100., xmax: 1000.,  ymin: 100.,  ymax: 1000.};
let bbox = bbox0 + bbox1;

assert_eq!(0., bbox.xmin);
assert_eq!(10000., bbox.xmax);
assert_eq!(10., bbox.ymin);
assert_eq!(1000., bbox.ymax);

impl<T> AddAssign for Bbox<T> where T: Float + ToPrimitive
[src]

fn add_assign(&mut self, rhs: Bbox<T>)

Add a boundingox to the given boundingbox.

use geo::Bbox;

let mut bbox0 = Bbox{xmin: 0.,  xmax: 10000., ymin: 10., ymax: 100.};
let bbox1 = Bbox{xmin: 100., xmax: 1000.,  ymin: 100.,  ymax: 1000.};
bbox0 += bbox1;

assert_eq!(0., bbox0.xmin);
assert_eq!(10000., bbox0.xmax);
assert_eq!(10., bbox0.ymin);
assert_eq!(1000., bbox0.ymax);

impl<T> Centroid<T> for Bbox<T> where T: Float
[src]

fn centroid(&self) -> Option<Point<T>>

Centroid on a Bbox.

impl<T> Contains<Bbox<T>> for Bbox<T> where T: Float
[src]

fn contains(&self, bbox: &Bbox<T>) -> bool

Checks if the geometry A is completely inside the B geometry. Read more

impl<T> Intersects<Bbox<T>> for Bbox<T> where T: Float
[src]

fn intersects(&self, bbox: &Bbox<T>) -> bool

Checks if the geometry A intersects the geometry B. Read more

impl<T> Area<T> for Bbox<T> where T: Float
[src]

fn area(&self) -> T