Trait s2::region::Region[][src]

pub trait Region {
    fn cap_bound(&self) -> Cap;

    fn rect_bound(&self) -> Rect { ... }
fn contains_cell(&self, cell: &Cell) -> bool { ... }
fn intersects_cell(&self, cell: &Cell) -> bool { ... } }

A Region represents a two-dimensional region on the unit sphere.

The purpose of this interface is to allow complex regions to be approximated as simpler regions. The interface is restricted to methods that are useful for computing approximations.

Required Methods

cap_bound returns a bounding spherical cap. This is not guaranteed to be exact.

Provided Methods

rect_bound returns a bounding latitude-longitude rectangle that contains the region. The bounds are not guaranteed to be tight.

contains_cell reports whether the region completely contains the given region. It returns false if containment could not be determined.

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.

Implementors