use crate::{Point, RTreeObject};
pub trait Envelope: Clone + Copy + PartialEq + ::core::fmt::Debug {
type Point: Point;
fn new_empty() -> Self;
fn contains_point(&self, point: &Self::Point) -> bool;
fn contains_envelope(&self, aabb: &Self) -> bool;
fn merge(&mut self, other: &Self);
fn merged(&self, other: &Self) -> Self;
fn intersects(&self, other: &Self) -> bool;
fn intersection_area(&self, other: &Self) -> <Self::Point as Point>::Scalar;
fn area(&self) -> <Self::Point as Point>::Scalar;
fn distance_2(&self, point: &Self::Point) -> <Self::Point as Point>::Scalar;
fn min_max_dist_2(&self, point: &Self::Point) -> <Self::Point as Point>::Scalar;
fn center(&self) -> Self::Point;
fn perimeter_value(&self) -> <Self::Point as Point>::Scalar;
fn sort_envelopes<T: RTreeObject<Envelope = Self>>(axis: usize, envelopes: &mut [T]);
fn partition_envelopes<T: RTreeObject<Envelope = Self>>(
axis: usize,
envelopes: &mut [T],
selection_size: usize,
);
}