[][src]Struct building_blocks::prelude::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,
    ArrayN<N, T>: Array<N>,
    ArrayN<N, T>: Get<Stride>,
    <ArrayN<N, T> as Get<Stride>>::Data == T, 
[src]

type Data = T

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

type Data = T

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

type Data = T

impl<'_, N, T> GetUncheckedMut<&'_ Local<N>> for ArrayN<N, T> where
    ArrayN<N, T>: Array<N>,
    ArrayN<N, T>: GetUncheckedMut<Stride>,
    <ArrayN<N, T> as 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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,