Trait box_intersect_ze::boxes::BBox [−][src]
pub trait BBox: Copy { type Num: Copy + PartialOrd; const DIM: usize; fn lo(&self, dim: usize) -> Self::Num; fn hi(&self, dim: usize) -> Self::Num; fn contains_in(&self, dim: usize, point: Self::Num) -> bool { ... } fn intersects_in(&self, dim: usize, lo: Self::Num, hi: Self::Num) -> bool { ... } fn intersects(&self, other: &Self) -> bool { ... } }
Trait for a DIM
-dimensional box with bounds of type Num
. More precisely, the
cartesian product of DIM
half-open intervals.
You probably want to use one of the box types below instead of implementing this yourself.
Associated Types
type Num: Copy + PartialOrd
[src]
Associated Constants
Loading content...Required methods
fn lo(&self, dim: usize) -> Self::Num
[src]
Returns the low boundary of this box in dimension dim
.
fn hi(&self, dim: usize) -> Self::Num
[src]
Returns the high boundary of this box in dimension dim
.
Provided methods
fn contains_in(&self, dim: usize, point: Self::Num) -> bool
[src]
Returns true
if the projection of this box in dimension dim
contains point
.
fn intersects_in(&self, dim: usize, lo: Self::Num, hi: Self::Num) -> bool
[src]
Returns true
if the projection of this box in dimension dim
intersects [lo
, hi
)