[−][src]Struct building_blocks::prelude::Local
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]
PointN<N>: Clone,
Wraps all of the points
using the Local
constructor.
Methods from Deref<Target = PointN<N>>
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 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 vector_div_floor(&self, rhs: &PointN<[T; 3]>) -> PointN<[T; 3]>
[src]
pub fn scalar_div_floor(&self, rhs: T) -> PointN<[T; 3]>
[src]
Trait Implementations
impl<N> Deref for Local<N>
[src]
type Target = PointN<N>
The resulting type after dereferencing.
pub fn deref(&self) -> &<Local<N> as Deref>::Target
[src]
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]
T: Clone,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: Get<Stride>,
<ArrayN<N, T> as Get<Stride>>::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]
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: GetMut<Stride>,
<ArrayN<N, T> as GetMut<Stride>>::Data == T,
type Data = T
pub fn get_mut(
&mut self,
p: &Local<N>
) -> &mut <ArrayN<N, T> as GetMut<&'_ Local<N>>>::Data
[src]
&mut self,
p: &Local<N>
) -> &mut <ArrayN<N, T> as GetMut<&'_ Local<N>>>::Data
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]
T: Clone,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: GetUnchecked<Stride>,
<ArrayN<N, T> as GetUnchecked<Stride>>::Data == T,
type Data = T
pub unsafe fn get_unchecked(
&self,
p: &Local<N>
) -> <ArrayN<N, T> as GetUnchecked<&'_ Local<N>>>::Data
[src]
&self,
p: &Local<N>
) -> <ArrayN<N, T> as GetUnchecked<&'_ Local<N>>>::Data
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]
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: GetUncheckedMut<Stride>,
<ArrayN<N, T> as GetUncheckedMut<Stride>>::Data == T,
type Data = T
pub unsafe fn get_unchecked_mut(
&mut self,
p: &Local<N>
) -> &mut <ArrayN<N, T> as GetUncheckedMut<&'_ Local<N>>>::Data
[src]
&mut self,
p: &Local<N>
) -> &mut <ArrayN<N, T> as GetUncheckedMut<&'_ Local<N>>>::Data
Auto Trait Implementations
impl<N> RefUnwindSafe for Local<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Local<N> where
N: Send,
N: Send,
impl<N> Sync for Local<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Local<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Local<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,