Struct s2::rect::Rect [−][src]
Fields
lat: Interval
lng: Interval
Methods
impl Rect
[src]
impl Rect
pub fn empty() -> Rect
[src]
pub fn empty() -> Rect
pub fn full() -> Rect
[src]
pub fn full() -> Rect
pub fn from_center_size(center: LatLng, size: LatLng) -> Self
[src]
pub fn from_center_size(center: LatLng, size: LatLng) -> Self
pub fn is_valid(&self) -> bool
[src]
pub fn is_valid(&self) -> bool
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
[src]
pub fn is_full(&self) -> bool
pub fn is_point(&self) -> bool
[src]
pub fn is_point(&self) -> bool
pub fn vertex(&self, i: u8) -> LatLng
[src]
pub fn vertex(&self, i: u8) -> LatLng
pub fn lo(&self) -> LatLng
[src]
pub fn lo(&self) -> LatLng
pub fn hi(&self) -> LatLng
[src]
pub fn hi(&self) -> LatLng
pub fn center(&self) -> LatLng
[src]
pub fn center(&self) -> LatLng
pub fn size(&self) -> LatLng
[src]
pub fn size(&self) -> LatLng
pub fn area(&self) -> f64
[src]
pub fn area(&self) -> f64
pub fn expanded(&self, margin: &LatLng) -> Self
[src]
pub fn expanded(&self, margin: &LatLng) -> Self
pub fn polar_closure(&self) -> Self
[src]
pub fn polar_closure(&self) -> Self
pub fn union(&self, other: &Self) -> Self
[src]
pub fn union(&self, other: &Self) -> Self
pub fn intersection(&self, other: &Self) -> Self
[src]
pub fn intersection(&self, other: &Self) -> Self
pub fn intersects(&self, other: &Rect) -> bool
[src]
pub fn intersects(&self, other: &Rect) -> bool
pub fn approx_eq(&self, other: &Self) -> bool
[src]
pub fn approx_eq(&self, other: &Self) -> bool
impl Rect
[src]
impl Rect
pub fn contains(&self, other: &Self) -> bool
[src]
pub fn contains(&self, other: &Self) -> bool
contains reports whether this Rect contains the other Rect.
pub fn contains_latlng(&self, ll: &LatLng) -> bool
[src]
pub fn contains_latlng(&self, ll: &LatLng) -> bool
contains_latlng reports whether the given LatLng is within the Rect.
pub fn contains_point(&self, p: &Point) -> bool
[src]
pub fn contains_point(&self, p: &Point) -> bool
contains_point reports whether the given Point is within the Rect.
Trait Implementations
impl Clone for Rect
[src]
impl Clone for Rect
fn clone(&self) -> Rect
[src]
fn clone(&self) -> Rect
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Rect
[src]
impl Debug for Rect
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, 'b> Add<&'a LatLng> for &'b Rect
[src]
impl<'a, 'b> Add<&'a LatLng> for &'b Rect
type Output = Rect
The resulting type after applying the +
operator.
fn add(self, ll: &'a LatLng) -> Self::Output
[src]
fn add(self, ll: &'a LatLng) -> Self::Output
Performs the +
operation.
impl From<LatLng> for Rect
[src]
impl From<LatLng> for Rect
impl Region for Rect
[src]
impl Region for Rect
fn cap_bound(&self) -> Cap
[src]
fn cap_bound(&self) -> Cap
cap_bound returns a cap that countains Rect.
fn rect_bound(&self) -> Rect
[src]
fn rect_bound(&self) -> Rect
rect_bound returns itself.
fn contains_cell(&self, c: &Cell) -> bool
[src]
fn contains_cell(&self, c: &Cell) -> bool
contains_cell reports whether the given Cell is contained by this Rect.
fn intersects_cell(&self, cell: &Cell) -> bool
[src]
fn intersects_cell(&self, cell: &Cell) -> bool
intersects_cell reports whether the region intersects the given cell or if intersection could not be determined. It returns false if the region does not intersect. Read more