Trait ntree::Region
[−]
[src]
pub trait Region<P>: Clone { fn contains(&self, _: &P) -> bool; fn split(&self) -> Vec<Self>; fn overlaps(&self, other: &Self) -> bool; }
The required interface for Regions in this n-tree.
Regions must be able to split themselves, tell if they overlap other regions, and tell if a point is contained within the region.
Required Methods
fn contains(&self, _: &P) -> bool
Does this region contain this point?
fn split(&self) -> Vec<Self>
Split this region, returning a Vec of sub-regions.
Invariants: - The sub-regions must NOT overlap. - All points in self must be contained within one and only one sub-region.
fn overlaps(&self, other: &Self) -> bool
Does this region overlap with this other region?