[][src]Struct building_blocks_storage::array::Local

pub struct Local<N>(pub PointN<N>);

Map-local coordinates.

Most commonly, you will index a lattice map with a PointN<N>, which is assumed to be in global coordinates. Local<N> only applies to lattice maps where a point must first be translated from global coordinates into map-local coordinates before indexing with Get<Local<N>>.

Implementations

impl<N> Local<N>[src]

pub fn localize_points(points: &[PointN<N>]) -> Vec<Local<N>> where
    PointN<N>: Clone
[src]

Wraps all of the points using the Local constructor.

Methods from Deref<Target = PointN<N>>

pub fn x(&self) -> T[src]

pub fn y(&self) -> T[src]

pub fn yx(&self) -> PointN<[T; 2]>[src]

pub fn vector_div_floor(&self, rhs: &PointN<[T; 2]>) -> PointN<[T; 2]>[src]

pub fn scalar_div_floor(&self, rhs: T) -> PointN<[T; 2]>[src]

pub fn round(&self) -> PointN<[f32; 2]>[src]

pub fn floor(&self) -> PointN<[f32; 2]>[src]

pub fn as_2i(&self) -> PointN<[i32; 2]>[src]

pub fn in_pixel(&self) -> PointN<[i32; 2]>[src]

pub fn x(&self) -> T[src]

pub fn y(&self) -> T[src]

pub fn z(&self) -> T[src]

pub fn xy(&self) -> PointN<[T; 2]>[src]

pub fn yx(&self) -> PointN<[T; 2]>[src]

pub fn yz(&self) -> PointN<[T; 2]>[src]

pub fn zy(&self) -> PointN<[T; 2]>[src]

pub fn zx(&self) -> PointN<[T; 2]>[src]

pub fn xz(&self) -> PointN<[T; 2]>[src]

pub fn yzx(&self) -> PointN<[T; 3]>[src]

pub fn zxy(&self) -> PointN<[T; 3]>[src]

pub fn zyx(&self) -> PointN<[T; 3]>[src]

pub fn cross(&self, other: &PointN<[T; 3]>) -> PointN<[T; 3]>[src]

pub fn vector_div_floor(&self, rhs: &PointN<[T; 3]>) -> PointN<[T; 3]>[src]

pub fn scalar_div_floor(&self, rhs: T) -> PointN<[T; 3]>[src]

pub fn round(&self) -> PointN<[f32; 3]>[src]

pub fn floor(&self) -> PointN<[f32; 3]>[src]

pub fn as_3i(&self) -> PointN<[i32; 3]>[src]

pub fn in_voxel(&self) -> PointN<[i32; 3]>[src]

Trait Implementations

impl<N> Deref for Local<N>[src]

type Target = PointN<N>

The resulting type after dereferencing.

impl<N, T, '_> Get<&'_ Local<N>> for ArrayN<N, T> where
    T: Clone,
    Self: Array<N> + Get<Stride, Data = T>, 
[src]

type Data = T

impl<N, T, '_> GetMut<&'_ Local<N>> for ArrayN<N, T> where
    Self: Array<N> + GetMut<Stride, Data = T>, 
[src]

type Data = T

impl<N, T, '_> GetUnchecked<&'_ Local<N>> for ArrayN<N, T> where
    T: Clone,
    Self: Array<N> + GetUnchecked<Stride, Data = T>, 
[src]

type Data = T

impl<N, T, '_> GetUncheckedMut<&'_ Local<N>> for ArrayN<N, T> where
    Self: Array<N> + GetUncheckedMut<Stride, Data = T>, 
[src]

type Data = T

Auto Trait Implementations

impl<N> RefUnwindSafe for Local<N> where
    N: RefUnwindSafe

impl<N> Send for Local<N> where
    N: Send

impl<N> Sync for Local<N> where
    N: Sync

impl<N> Unpin for Local<N> where
    N: Unpin

impl<N> UnwindSafe for Local<N> where
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.