[][src]Trait building_blocks_core::point::IntegerPoint

pub trait IntegerPoint: Point {
    const MIN: Self;
    const MAX: Self;

    fn join(&self, other: &Self) -> Self;
fn meet(&self, other: &Self) -> Self;
fn left_shift(&self, shift_by: Self::Scalar) -> Self;
fn right_shift(&self, shift_by: Self::Scalar) -> Self;
fn corner_offsets() -> Vec<Self>;
fn von_neumann_offsets() -> Vec<Self>;
fn moore_offsets() -> Vec<Self>;
fn dimensions_are_powers_of_2(&self) -> bool;
fn is_cube(&self) -> bool; }

Associated Constants

const MIN: Self

The least point.

const MAX: Self

The greatest point.

Loading content...

Required methods

fn join(&self, other: &Self) -> Self

Component-wise maximum.

fn meet(&self, other: &Self) -> Self

Component-wise minimum.

fn left_shift(&self, shift_by: Self::Scalar) -> Self

Left bitshifts all dimensions.

fn right_shift(&self, shift_by: Self::Scalar) -> Self

Right bitshifts all dimensions.

fn corner_offsets() -> Vec<Self>

All corners of an N-dimensional unit cube.

fn von_neumann_offsets() -> Vec<Self>

fn moore_offsets() -> Vec<Self>

fn dimensions_are_powers_of_2(&self) -> bool

Returns true iff all dimensions are powers of 2.

fn is_cube(&self) -> bool

Returns true iff all dimensions are equal.

Loading content...

Implementors

impl IntegerPoint for Point2i[src]

impl IntegerPoint for Point3i[src]

Loading content...