Struct geo::Bbox
[−]
[src]
pub struct Bbox<T> where
T: CoordinateType, {
pub xmin: T,
pub xmax: T,
pub ymin: T,
pub ymax: T,
}
A container for the bounding box of a Geometry
Fields
xmin: T
xmax: T
ymin: T
ymax: T
Trait Implementations
impl<T: PartialEq> PartialEq for Bbox<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn eq(&self, __arg_0: &Bbox<T>) -> bool
[src]
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
[src]
This method tests for !=
.
impl<T: Clone> Clone for Bbox<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn clone(&self) -> Bbox<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for Bbox<T> where
T: CoordinateType,
[src]
T: CoordinateType,
impl<T: Debug> Debug for Bbox<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Add for Bbox<T> where
T: CoordinateType + ToPrimitive,
[src]
T: CoordinateType + ToPrimitive,
type Output = Bbox<T>
The resulting type after applying the +
operator.
fn add(self, rhs: Bbox<T>) -> Bbox<T>
[src]
Add a BoundingBox 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: CoordinateType + ToPrimitive,
[src]
T: CoordinateType + ToPrimitive,
fn add_assign(&mut self, rhs: Bbox<T>)
[src]
Add a BoundingBox 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]
T: Float,
type Output = Point<T>
fn centroid(&self) -> Self::Output
[src]
See: https://en.wikipedia.org/wiki/Centroid Read more
impl<T> Contains<Point<T>> for Bbox<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn contains(&self, p: &Point<T>) -> bool
[src]
Checks if the geometry A is completely inside the B geometry. Read more
impl<T> Contains<Bbox<T>> for Bbox<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn contains(&self, bbox: &Bbox<T>) -> bool
[src]
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]
T: Float,
fn intersects(&self, bbox: &Bbox<T>) -> bool
[src]
Checks if the geometry A intersects the geometry B. Read more
impl<T> Intersects<Polygon<T>> for Bbox<T> where
T: Float,
[src]
T: Float,
fn intersects(&self, polygon: &Polygon<T>) -> bool
[src]
Checks if the geometry A intersects the geometry B. Read more
impl<T> Intersects<Bbox<T>> for Polygon<T> where
T: Float,
[src]
T: Float,
fn intersects(&self, bbox: &Bbox<T>) -> bool
[src]
Checks if the geometry A intersects the geometry B. Read more
impl<T> Area<T> for Bbox<T> where
T: Float,
[src]
T: Float,