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

Loading content...

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.

Loading content...

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)

fn intersects(&self, other: &Self) -> bool[src]

Loading content...

Implementors

impl<B, const N: usize> BBox for BoxND<B, N> where
    B: Copy + PartialOrd
[src]

type Num = B

Loading content...