pub trait RTreeElement {
// Required methods
fn bbox(&self) -> BoundingBox;
fn distance_to(&self, coordinate: &FPCoordinate) -> f64;
fn center(&self) -> &FPCoordinate;
}
Expand description
Trait for elements that can be stored in an RTree
Required Methods§
Sourcefn bbox(&self) -> BoundingBox
fn bbox(&self) -> BoundingBox
Returns the bounding box of this element
Sourcefn distance_to(&self, coordinate: &FPCoordinate) -> f64
fn distance_to(&self, coordinate: &FPCoordinate) -> f64
Returns the distance from this element to the given coordinate
Sourcefn center(&self) -> &FPCoordinate
fn center(&self) -> &FPCoordinate
Returns the center coordinate of this element