[−][src]Struct building_blocks::prelude::PointN
An N-dimensional point (where N=2 or N=3), which is usually just a primitive array like
[i32; 2]
or [i32; 3]
. It is most convenient to construct points of any dimension as:
use building_blocks_core::PointN; let p2 = PointN([1, 2]); // 2D let p3 = PointN([1, 2, 3]); // 3D
Points support basic linear algebraic operations such as addition, subtraction, scalar multiplication, and scalar division.
let p1 = PointN([1, 2]); let p2 = PointN([3, 4]); assert_eq!(p1 + p2, PointN([4, 6])); assert_eq!(p1 - p2, PointN([-2, -2])); assert_eq!(p1 * 2, PointN([2, 4])); assert_eq!(p1 / 2, PointN([0, 1])); // Also some component-wise operations. assert_eq!(p1 * p2, PointN([3, 8])); assert_eq!(p1 / p2, PointN([0, 0])); assert_eq!(p2 / p1, PointN([3, 2]));
There is also a partial order defined on points which says that a point A is greater than a point B if and only if all of the components of point A are greater than point B. This is useful for easily checking is a point is inside of the extent between two other points:
let min = PointN([0, 0, 0]); let least_upper_bound = PointN([3, 3, 3]); let p = PointN([0, 1, 2]); assert!(min <= p && p < least_upper_bound);
Implementations
impl<T> PointN<[T; 2]>
[src]
impl<T> PointN<[T; 2]> where
T: Copy,
[src]
T: Copy,
impl<T> PointN<[T; 2]> where
T: Copy + Integer,
[src]
T: Copy + Integer,
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]
impl PointN<[f32; 2]>
[src]
impl PointN<[f32; 2]>
[src]
impl<T> PointN<[T; 3]>
[src]
pub fn x_mut(&mut self) -> &mut T
[src]
pub fn y_mut(&mut self) -> &mut T
[src]
pub fn z_mut(&mut self) -> &mut T
[src]
impl<T> PointN<[T; 3]> where
T: Copy,
[src]
T: Copy,
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]
impl<T> PointN<[T; 3]> where
T: Mul<T, Output = T> + Sub<T, Output = T> + Copy,
[src]
T: Mul<T, Output = T> + Sub<T, Output = T> + Copy,
impl<T> PointN<[T; 3]> where
T: Copy + Integer,
[src]
T: Copy + Integer,
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]
impl PointN<[f32; 3]>
[src]
impl PointN<[f32; 3]>
[src]
Trait Implementations
impl<T> Add<PointN<[T; 2]>> for PointN<[T; 2]> where
T: Copy + AddAssign<T>,
[src]
T: Copy + AddAssign<T>,
type Output = PointN<[T; 2]>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: PointN<[T; 2]>
) -> <PointN<[T; 2]> as Add<PointN<[T; 2]>>>::Output
[src]
self,
rhs: PointN<[T; 2]>
) -> <PointN<[T; 2]> as Add<PointN<[T; 2]>>>::Output
impl<T> Add<PointN<[T; 3]>> for PointN<[T; 3]> where
T: AddAssign<T> + Copy,
[src]
T: AddAssign<T> + Copy,
type Output = PointN<[T; 3]>
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: PointN<[T; 3]>
) -> <PointN<[T; 3]> as Add<PointN<[T; 3]>>>::Output
[src]
self,
rhs: PointN<[T; 3]>
) -> <PointN<[T; 3]> as Add<PointN<[T; 3]>>>::Output
impl<T> Add<PointN<T>> for ExtentN<T> where
PointN<T>: Add<PointN<T>>,
<PointN<T> as Add<PointN<T>>>::Output == PointN<T>,
[src]
PointN<T>: Add<PointN<T>>,
<PointN<T> as Add<PointN<T>>>::Output == PointN<T>,
type Output = ExtentN<T>
The resulting type after applying the +
operator.
pub fn add(self, rhs: PointN<T>) -> <ExtentN<T> as Add<PointN<T>>>::Output
[src]
impl<N> AddAssign<PointN<N>> for PointN<N> where
N: Copy,
PointN<N>: Add<PointN<N>>,
<PointN<N> as Add<PointN<N>>>::Output == PointN<N>,
[src]
N: Copy,
PointN<N>: Add<PointN<N>>,
<PointN<N> as Add<PointN<N>>>::Output == PointN<N>,
pub fn add_assign(&mut self, rhs: PointN<N>)
[src]
impl<T> AddAssign<PointN<T>> for ExtentN<T> where
ExtentN<T>: Copy,
ExtentN<T>: Add<PointN<T>>,
<ExtentN<T> as Add<PointN<T>>>::Output == ExtentN<T>,
[src]
ExtentN<T>: Copy,
ExtentN<T>: Add<PointN<T>>,
<ExtentN<T> as Add<PointN<T>>>::Output == ExtentN<T>,
pub fn add_assign(&mut self, rhs: PointN<T>)
[src]
impl<T> Bounded for PointN<[T; 2]> where
T: Bounded,
[src]
T: Bounded,
impl<T> Bounded for PointN<[T; 3]> where
T: Bounded,
[src]
T: Bounded,
impl ChunkShape<[i32; 2]> for PointN<[i32; 2]>
[src]
pub fn mask(&self) -> PointN<[i32; 2]>
[src]
pub fn chunk_key_containing_point(
mask: &PointN<[i32; 2]>,
p: &PointN<[i32; 2]>
) -> PointN<[i32; 2]>
[src]
mask: &PointN<[i32; 2]>,
p: &PointN<[i32; 2]>
) -> PointN<[i32; 2]>
impl ChunkShape<[i32; 3]> for PointN<[i32; 3]>
[src]
pub fn mask(&self) -> PointN<[i32; 3]>
[src]
pub fn chunk_key_containing_point(
mask: &PointN<[i32; 3]>,
p: &PointN<[i32; 3]>
) -> PointN<[i32; 3]>
[src]
mask: &PointN<[i32; 3]>,
p: &PointN<[i32; 3]>
) -> PointN<[i32; 3]>
impl<N> Clone for PointN<N> where
N: Clone,
[src]
N: Clone,
impl<N> Copy for PointN<N> where
N: Copy,
[src]
N: Copy,
impl<N> Debug for PointN<N> where
N: Debug,
[src]
N: Debug,
impl<N> Default for PointN<N> where
N: Default,
[src]
N: Default,
impl<'de, N> Deserialize<'de> for PointN<N> where
N: Deserialize<'de>,
[src]
N: Deserialize<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<PointN<N>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<PointN<N>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<T> Distance for PointN<[T; 3]> where
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 3]>: Point,
<PointN<[T; 3]> as Point>::Scalar == T,
[src]
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 3]>: Point,
<PointN<[T; 3]> as Point>::Scalar == T,
pub fn l1_distance(
&self,
other: &PointN<[T; 3]>
) -> <PointN<[T; 3]> as Point>::Scalar
[src]
&self,
other: &PointN<[T; 3]>
) -> <PointN<[T; 3]> as Point>::Scalar
pub fn l2_distance_squared(
&self,
other: &PointN<[T; 3]>
) -> <PointN<[T; 3]> as Point>::Scalar
[src]
&self,
other: &PointN<[T; 3]>
) -> <PointN<[T; 3]> as Point>::Scalar
impl<T> Distance for PointN<[T; 2]> where
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 2]>: Point,
<PointN<[T; 2]> as Point>::Scalar == T,
[src]
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 2]>: Point,
<PointN<[T; 2]> as Point>::Scalar == T,
pub fn l1_distance(
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
[src]
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
pub fn l2_distance_squared(
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
[src]
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
impl Div<PointN<[f32; 2]>> for PointN<[f32; 2]>
[src]
type Output = PointN<[f32; 2]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: PointN<[f32; 2]>) -> PointN<[f32; 2]>
[src]
impl Div<PointN<[f32; 3]>> for PointN<[f32; 3]>
[src]
type Output = PointN<[f32; 3]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: PointN<[f32; 3]>) -> PointN<[f32; 3]>
[src]
impl Div<PointN<[i32; 2]>> for PointN<[i32; 2]>
[src]
type Output = PointN<[i32; 2]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>
[src]
impl Div<PointN<[i32; 3]>> for PointN<[i32; 3]>
[src]
type Output = PointN<[i32; 3]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>
[src]
impl Div<f32> for PointN<[f32; 2]>
[src]
type Output = PointN<[f32; 2]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: f32) -> PointN<[f32; 2]>
[src]
impl Div<f32> for PointN<[f32; 3]>
[src]
type Output = PointN<[f32; 3]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: f32) -> PointN<[f32; 3]>
[src]
impl Div<i32> for PointN<[i32; 2]>
[src]
type Output = PointN<[i32; 2]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: i32) -> PointN<[i32; 2]>
[src]
impl Div<i32> for PointN<[i32; 3]>
[src]
type Output = PointN<[i32; 3]>
The resulting type after applying the /
operator.
pub fn div(self, rhs: i32) -> PointN<[i32; 3]>
[src]
impl<T> DotProduct for PointN<[T; 2]> where
T: Add<T, Output = T> + Mul<T, Output = T> + Copy,
[src]
T: Add<T, Output = T> + Mul<T, Output = T> + Copy,
type Scalar = T
pub fn dot(
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as DotProduct>::Scalar
[src]
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as DotProduct>::Scalar
impl<T> DotProduct for PointN<[T; 3]> where
T: Add<T, Output = T> + Mul<T, Output = T> + Copy,
[src]
T: Add<T, Output = T> + Mul<T, Output = T> + Copy,
type Scalar = T
pub fn dot(
&self,
other: &PointN<[T; 3]>
) -> <PointN<[T; 3]> as DotProduct>::Scalar
[src]
&self,
other: &PointN<[T; 3]>
) -> <PointN<[T; 3]> as DotProduct>::Scalar
impl<N> Eq for PointN<N> where
N: Eq,
[src]
N: Eq,
impl<N, T> ForEach<N, PointN<N>> for AmbientExtent<N, T> where
T: Clone,
ExtentN<N>: IntegerExtent<N>,
[src]
T: Clone,
ExtentN<N>: IntegerExtent<N>,
type Data = T
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <AmbientExtent<N, T> as ForEach<N, PointN<N>>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <AmbientExtent<N, T> as ForEach<N, PointN<N>>>::Data)
)
impl<'a, F, N, T> ForEach<N, PointN<N>> for F where
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
[src]
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
type Data = T
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
impl<N, T> ForEach<N, PointN<N>> for ArrayN<N, T> where
ArrayN<N, T>: Sized,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: Get<Stride>,
ArrayN<N, T>: GetUnchecked<Stride>,
<ArrayN<N, T> as Get<Stride>>::Data == T,
<ArrayN<N, T> as GetUnchecked<Stride>>::Data == T,
[src]
ArrayN<N, T>: Sized,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: Get<Stride>,
ArrayN<N, T>: GetUnchecked<Stride>,
<ArrayN<N, T> as Get<Stride>>::Data == T,
<ArrayN<N, T> as GetUnchecked<Stride>>::Data == T,
impl<'a, N, T, M> ForEach<N, PointN<N>> for ChunkMapReader<'a, N, T, M> where
M: Clone,
T: Copy,
PointN<N>: IntegerPoint,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: ForEach<N, PointN<N>>,
<ArrayN<N, T> as ForEach<N, PointN<N>>>::Data == T,
[src]
M: Clone,
T: Copy,
PointN<N>: IntegerPoint,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: ForEach<N, PointN<N>>,
<ArrayN<N, T> as ForEach<N, PointN<N>>>::Data == T,
type Data = T
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <ChunkMapReader<'a, N, T, M> as ForEach<N, PointN<N>>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <ChunkMapReader<'a, N, T, M> as ForEach<N, PointN<N>>>::Data)
)
impl<N, T> ForEachMut<N, PointN<N>> for ArrayN<N, T> where
ArrayN<N, T>: Sized,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: GetMut<Stride>,
ArrayN<N, T>: GetUncheckedMut<Stride>,
ExtentN<N>: Copy,
<ArrayN<N, T> as GetMut<Stride>>::Data == T,
<ArrayN<N, T> as GetUncheckedMut<Stride>>::Data == T,
[src]
ArrayN<N, T>: Sized,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: GetMut<Stride>,
ArrayN<N, T>: GetUncheckedMut<Stride>,
ExtentN<N>: Copy,
<ArrayN<N, T> as GetMut<Stride>>::Data == T,
<ArrayN<N, T> as GetUncheckedMut<Stride>>::Data == T,
type Data = T
pub fn for_each_mut(
&mut self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, &mut T)
)
[src]
&mut self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, &mut T)
)
impl<'a, N, T, M> ForEachMut<N, PointN<N>> for ChunkMap<N, T, M> where
M: Clone,
T: Copy,
PointN<N>: Point,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: ForEachMut<N, PointN<N>>,
<ArrayN<N, T> as ForEachMut<N, PointN<N>>>::Data == T,
[src]
M: Clone,
T: Copy,
PointN<N>: Point,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: ForEachMut<N, PointN<N>>,
<ArrayN<N, T> as ForEachMut<N, PointN<N>>>::Data == T,
type Data = T
pub fn for_each_mut(
&mut self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, &mut <ChunkMap<N, T, M> as ForEachMut<N, PointN<N>>>::Data)
)
[src]
&mut self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, &mut <ChunkMap<N, T, M> as ForEachMut<N, PointN<N>>>::Data)
)
impl From<Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>> for PointN<[f32; 2]>
[src]
pub fn from(
p: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> PointN<[f32; 2]>
[src]
p: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> PointN<[f32; 2]>
impl From<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>> for PointN<[f32; 3]>
[src]
pub fn from(
p: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> PointN<[f32; 3]>
[src]
p: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> PointN<[f32; 3]>
impl From<Matrix<i32, U2, U1, <DefaultAllocator as Allocator<i32, U2, U1>>::Buffer>> for PointN<[i32; 2]>
[src]
pub fn from(
p: Matrix<i32, U2, U1, <DefaultAllocator as Allocator<i32, U2, U1>>::Buffer>
) -> PointN<[i32; 2]>
[src]
p: Matrix<i32, U2, U1, <DefaultAllocator as Allocator<i32, U2, U1>>::Buffer>
) -> PointN<[i32; 2]>
impl From<Matrix<i32, U3, U1, <DefaultAllocator as Allocator<i32, U3, U1>>::Buffer>> for PointN<[i32; 3]>
[src]
pub fn from(
p: Matrix<i32, U3, U1, <DefaultAllocator as Allocator<i32, U3, U1>>::Buffer>
) -> PointN<[i32; 3]>
[src]
p: Matrix<i32, U3, U1, <DefaultAllocator as Allocator<i32, U3, U1>>::Buffer>
) -> PointN<[i32; 3]>
impl From<Point<f32, U2>> for PointN<[f32; 2]>
[src]
impl From<Point<f32, U3>> for PointN<[f32; 3]>
[src]
impl From<Point<i32, U2>> for PointN<[i32; 2]>
[src]
impl From<Point<i32, U3>> for PointN<[i32; 3]>
[src]
impl<T> From<Point2<T>> for PointN<[T; 2]>
[src]
impl<T> From<Point3<T>> for PointN<[T; 3]>
[src]
impl From<PointN<[i32; 2]>> for PointN<[f32; 2]>
[src]
impl From<PointN<[i32; 3]>> for PointN<[f32; 3]>
[src]
impl<T> From<Vector2<T>> for PointN<[T; 2]>
[src]
impl<T> From<Vector3<T>> for PointN<[T; 3]>
[src]
impl<'_, N, T> Get<&'_ PointN<N>> for ArrayN<N, T> where
T: Clone,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> Get<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as Get<&'r Local<N>>>::Data == T,
[src]
T: Clone,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> Get<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as Get<&'r Local<N>>>::Data == T,
impl<'a, '_, N, T, M> Get<&'_ PointN<N>> for ChunkMapReader<'a, N, T, M> where
M: Clone,
T: Copy,
PointN<N>: IntegerPoint,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: Array<N>,
[src]
M: Clone,
T: Copy,
PointN<N>: IntegerPoint,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: Array<N>,
type Data = T
pub fn get(
&self,
p: &PointN<N>
) -> <ChunkMapReader<'a, N, T, M> as Get<&'_ PointN<N>>>::Data
[src]
&self,
p: &PointN<N>
) -> <ChunkMapReader<'a, N, T, M> as Get<&'_ PointN<N>>>::Data
impl<'_, N, T> GetMut<&'_ PointN<N>> for ArrayN<N, T> where
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> GetMut<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as GetMut<&'r Local<N>>>::Data == T,
[src]
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> GetMut<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as GetMut<&'r Local<N>>>::Data == T,
type Data = T
pub fn get_mut(
&mut self,
p: &PointN<N>
) -> &mut <ArrayN<N, T> as GetMut<&'_ PointN<N>>>::Data
[src]
&mut self,
p: &PointN<N>
) -> &mut <ArrayN<N, T> as GetMut<&'_ PointN<N>>>::Data
impl<'_, N, T, M> GetMut<&'_ PointN<N>> for ChunkMap<N, T, M> where
M: Clone,
T: Copy,
PointN<N>: IntegerPoint,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: Array<N>,
[src]
M: Clone,
T: Copy,
PointN<N>: IntegerPoint,
PointN<N>: ChunkShape<N>,
PointN<N>: Eq,
PointN<N>: Hash,
ExtentN<N>: IntegerExtent<N>,
ArrayN<N, T>: Array<N>,
impl<'_, N, T> GetUnchecked<&'_ PointN<N>> for ArrayN<N, T> where
T: Clone,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> GetUnchecked<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as GetUnchecked<&'r Local<N>>>::Data == T,
[src]
T: Clone,
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> GetUnchecked<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as GetUnchecked<&'r Local<N>>>::Data == T,
type Data = T
pub unsafe fn get_unchecked(
&self,
p: &PointN<N>
) -> <ArrayN<N, T> as GetUnchecked<&'_ PointN<N>>>::Data
[src]
&self,
p: &PointN<N>
) -> <ArrayN<N, T> as GetUnchecked<&'_ PointN<N>>>::Data
impl<'_, N, T> GetUncheckedMut<&'_ PointN<N>> for ArrayN<N, T> where
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> GetUncheckedMut<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as GetUncheckedMut<&'r Local<N>>>::Data == T,
[src]
ArrayN<N, T>: Array<N>,
ArrayN<N, T>: for<'r> GetUncheckedMut<&'r Local<N>>,
PointN<N>: Point,
<ArrayN<N, T> as GetUncheckedMut<&'r Local<N>>>::Data == T,
type Data = T
pub unsafe fn get_unchecked_mut(
&mut self,
p: &PointN<N>
) -> &mut <ArrayN<N, T> as GetUncheckedMut<&'_ PointN<N>>>::Data
[src]
&mut self,
p: &PointN<N>
) -> &mut <ArrayN<N, T> as GetUncheckedMut<&'_ PointN<N>>>::Data
impl<N> Hash for PointN<N> where
N: Hash,
[src]
N: Hash,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl IntegerPoint for PointN<[i32; 3]>
[src]
pub const MIN: PointN<[i32; 3]>
[src]
pub const MAX: PointN<[i32; 3]>
[src]
pub fn join(&self, other: &PointN<[i32; 3]>) -> PointN<[i32; 3]>
[src]
pub fn meet(&self, other: &PointN<[i32; 3]>) -> PointN<[i32; 3]>
[src]
pub fn left_shift(&self, shift_by: i32) -> PointN<[i32; 3]>
[src]
pub fn right_shift(&self, shift_by: i32) -> PointN<[i32; 3]>
[src]
pub fn corner_offsets() -> Vec<PointN<[i32; 3]>>
[src]
pub fn von_neumann_offsets() -> Vec<PointN<[i32; 3]>>
[src]
pub fn moore_offsets() -> Vec<PointN<[i32; 3]>>
[src]
pub fn dimensions_are_powers_of_2(&self) -> bool
[src]
pub fn is_cube(&self) -> bool
[src]
impl IntegerPoint for PointN<[i32; 2]>
[src]
pub const MIN: PointN<[i32; 2]>
[src]
pub const MAX: PointN<[i32; 2]>
[src]
pub fn join(&self, other: &PointN<[i32; 2]>) -> PointN<[i32; 2]>
[src]
pub fn meet(&self, other: &PointN<[i32; 2]>) -> PointN<[i32; 2]>
[src]
pub fn left_shift(&self, shift_by: i32) -> PointN<[i32; 2]>
[src]
pub fn right_shift(&self, shift_by: i32) -> PointN<[i32; 2]>
[src]
pub fn corner_offsets() -> Vec<PointN<[i32; 2]>>
[src]
pub fn von_neumann_offsets() -> Vec<PointN<[i32; 2]>>
[src]
pub fn moore_offsets() -> Vec<PointN<[i32; 2]>>
[src]
pub fn dimensions_are_powers_of_2(&self) -> bool
[src]
pub fn is_cube(&self) -> bool
[src]
impl<T> Mul<PointN<[T; 2]>> for PointN<[T; 2]> where
T: Copy + Mul<T, Output = T>,
[src]
T: Copy + Mul<T, Output = T>,
type Output = PointN<[T; 2]>
The resulting type after applying the *
operator.
pub fn mul(self, other: PointN<[T; 2]>) -> PointN<[T; 2]>
[src]
impl<T> Mul<PointN<[T; 3]>> for PointN<[T; 3]> where
T: Copy + Mul<T, Output = T>,
[src]
T: Copy + Mul<T, Output = T>,
type Output = PointN<[T; 3]>
The resulting type after applying the *
operator.
pub fn mul(self, other: PointN<[T; 3]>) -> PointN<[T; 3]>
[src]
impl<T> Mul<T> for PointN<[T; 2]> where
T: Copy + Mul<T, Output = T>,
[src]
T: Copy + Mul<T, Output = T>,
type Output = PointN<[T; 2]>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: T) -> PointN<[T; 2]>
[src]
impl<T> Mul<T> for PointN<[T; 3]> where
T: Copy + Mul<T, Output = T>,
[src]
T: Copy + Mul<T, Output = T>,
type Output = PointN<[T; 3]>
The resulting type after applying the *
operator.
pub fn mul(self, rhs: T) -> PointN<[T; 3]>
[src]
impl<N> Neg for PointN<N> where
N: Copy,
PointN<N>: Sub<PointN<N>>,
PointN<N>: Zero,
<PointN<N> as Sub<PointN<N>>>::Output == PointN<N>,
[src]
N: Copy,
PointN<N>: Sub<PointN<N>>,
PointN<N>: Zero,
<PointN<N> as Sub<PointN<N>>>::Output == PointN<N>,
type Output = PointN<N>
The resulting type after applying the -
operator.
pub fn neg(self) -> <PointN<N> as Neg>::Output
[src]
impl NormSquared for PointN<[f32; 2]>
[src]
pub fn norm_squared(&self) -> f32
[src]
impl NormSquared for PointN<[i32; 3]>
[src]
pub fn norm_squared(&self) -> f32
[src]
impl NormSquared for PointN<[i32; 2]>
[src]
pub fn norm_squared(&self) -> f32
[src]
impl NormSquared for PointN<[f32; 3]>
[src]
pub fn norm_squared(&self) -> f32
[src]
impl<T> Ones for PointN<[T; 3]> where
T: SmallOne,
[src]
T: SmallOne,
impl<T> Ones for PointN<[T; 2]> where
T: SmallOne,
[src]
T: SmallOne,
impl<N> PartialEq<PointN<N>> for PointN<N> where
N: PartialEq<N>,
[src]
N: PartialEq<N>,
impl<T> PartialOrd<PointN<[T; 2]>> for PointN<[T; 2]> where
T: Copy + PartialOrd<T>,
[src]
T: Copy + PartialOrd<T>,
pub fn partial_cmp(&self, other: &PointN<[T; 2]>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &PointN<[T; 2]>) -> bool
[src]
pub fn gt(&self, other: &PointN<[T; 2]>) -> bool
[src]
pub fn le(&self, other: &PointN<[T; 2]>) -> bool
[src]
pub fn ge(&self, other: &PointN<[T; 2]>) -> bool
[src]
impl<T> PartialOrd<PointN<[T; 3]>> for PointN<[T; 3]> where
T: Copy + PartialOrd<T>,
[src]
T: Copy + PartialOrd<T>,
pub fn partial_cmp(&self, other: &PointN<[T; 3]>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &PointN<[T; 3]>) -> bool
[src]
pub fn gt(&self, other: &PointN<[T; 3]>) -> bool
[src]
pub fn le(&self, other: &PointN<[T; 3]>) -> bool
[src]
pub fn ge(&self, other: &PointN<[T; 3]>) -> bool
[src]
impl Point for PointN<[i32; 3]>
[src]
type Scalar = i32
pub fn basis() -> Vec<PointN<[i32; 3]>>
[src]
pub fn abs(&self) -> PointN<[i32; 3]>
[src]
pub fn at(&self, component_index: usize) -> <PointN<[i32; 3]> as Point>::Scalar
[src]
pub fn map_components(
&self,
f: impl Fn(<PointN<[i32; 3]> as Point>::Scalar) -> <PointN<[i32; 3]> as Point>::Scalar
) -> PointN<[i32; 3]>
[src]
&self,
f: impl Fn(<PointN<[i32; 3]> as Point>::Scalar) -> <PointN<[i32; 3]> as Point>::Scalar
) -> PointN<[i32; 3]>
impl Point for PointN<[f32; 3]>
[src]
type Scalar = f32
pub fn basis() -> Vec<PointN<[f32; 3]>>
[src]
pub fn abs(&self) -> PointN<[f32; 3]>
[src]
pub fn at(&self, component_index: usize) -> <PointN<[f32; 3]> as Point>::Scalar
[src]
pub fn map_components(
&self,
f: impl Fn(<PointN<[f32; 3]> as Point>::Scalar) -> <PointN<[f32; 3]> as Point>::Scalar
) -> PointN<[f32; 3]>
[src]
&self,
f: impl Fn(<PointN<[f32; 3]> as Point>::Scalar) -> <PointN<[f32; 3]> as Point>::Scalar
) -> PointN<[f32; 3]>
impl Point for PointN<[f32; 2]>
[src]
type Scalar = f32
pub fn basis() -> Vec<PointN<[f32; 2]>>
[src]
pub fn abs(&self) -> PointN<[f32; 2]>
[src]
pub fn at(&self, component_index: usize) -> <PointN<[f32; 2]> as Point>::Scalar
[src]
pub fn map_components(
&self,
f: impl Fn(<PointN<[f32; 2]> as Point>::Scalar) -> <PointN<[f32; 2]> as Point>::Scalar
) -> PointN<[f32; 2]>
[src]
&self,
f: impl Fn(<PointN<[f32; 2]> as Point>::Scalar) -> <PointN<[f32; 2]> as Point>::Scalar
) -> PointN<[f32; 2]>
impl Point for PointN<[i32; 2]>
[src]
type Scalar = i32
pub fn basis() -> Vec<PointN<[i32; 2]>>
[src]
pub fn abs(&self) -> PointN<[i32; 2]>
[src]
pub fn at(&self, component_index: usize) -> <PointN<[i32; 2]> as Point>::Scalar
[src]
pub fn map_components(
&self,
f: impl Fn(<PointN<[i32; 2]> as Point>::Scalar) -> <PointN<[i32; 2]> as Point>::Scalar
) -> PointN<[i32; 2]>
[src]
&self,
f: impl Fn(<PointN<[i32; 2]> as Point>::Scalar) -> <PointN<[i32; 2]> as Point>::Scalar
) -> PointN<[i32; 2]>
impl<N> Serialize for PointN<N> where
N: Serialize,
[src]
N: Serialize,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<T> SmallZero for PointN<[T; 2]> where
T: SmallZero,
[src]
T: SmallZero,
impl<T> SmallZero for PointN<[T; 3]> where
T: SmallZero,
[src]
T: SmallZero,
impl<N> StructuralEq for PointN<N>
[src]
impl<N> StructuralPartialEq for PointN<N>
[src]
impl<T> Sub<PointN<[T; 2]>> for PointN<[T; 2]> where
T: Copy + SubAssign<T>,
[src]
T: Copy + SubAssign<T>,
type Output = PointN<[T; 2]>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: PointN<[T; 2]>
) -> <PointN<[T; 2]> as Sub<PointN<[T; 2]>>>::Output
[src]
self,
rhs: PointN<[T; 2]>
) -> <PointN<[T; 2]> as Sub<PointN<[T; 2]>>>::Output
impl<T> Sub<PointN<[T; 3]>> for PointN<[T; 3]> where
T: SubAssign<T> + Copy,
[src]
T: SubAssign<T> + Copy,
type Output = PointN<[T; 3]>
The resulting type after applying the -
operator.
pub fn sub(
self,
rhs: PointN<[T; 3]>
) -> <PointN<[T; 3]> as Sub<PointN<[T; 3]>>>::Output
[src]
self,
rhs: PointN<[T; 3]>
) -> <PointN<[T; 3]> as Sub<PointN<[T; 3]>>>::Output
impl<T> Sub<PointN<T>> for ExtentN<T> where
PointN<T>: Sub<PointN<T>>,
<PointN<T> as Sub<PointN<T>>>::Output == PointN<T>,
[src]
PointN<T>: Sub<PointN<T>>,
<PointN<T> as Sub<PointN<T>>>::Output == PointN<T>,
type Output = ExtentN<T>
The resulting type after applying the -
operator.
pub fn sub(self, rhs: PointN<T>) -> <ExtentN<T> as Sub<PointN<T>>>::Output
[src]
impl<N> SubAssign<PointN<N>> for PointN<N> where
N: Copy,
PointN<N>: Sub<PointN<N>>,
<PointN<N> as Sub<PointN<N>>>::Output == PointN<N>,
[src]
N: Copy,
PointN<N>: Sub<PointN<N>>,
<PointN<N> as Sub<PointN<N>>>::Output == PointN<N>,
pub fn sub_assign(&mut self, rhs: PointN<N>)
[src]
impl<T> SubAssign<PointN<T>> for ExtentN<T> where
ExtentN<T>: Copy,
ExtentN<T>: Sub<PointN<T>>,
<ExtentN<T> as Sub<PointN<T>>>::Output == ExtentN<T>,
[src]
ExtentN<T>: Copy,
ExtentN<T>: Sub<PointN<T>>,
<ExtentN<T> as Sub<PointN<T>>>::Output == ExtentN<T>,
pub fn sub_assign(&mut self, rhs: PointN<T>)
[src]
impl<N> Zero for PointN<N> where
PointN<N>: Point,
PointN<N>: SmallZero,
[src]
PointN<N>: Point,
PointN<N>: SmallZero,
Auto Trait Implementations
impl<N> RefUnwindSafe for PointN<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for PointN<N> where
N: Send,
N: Send,
impl<N> Sync for PointN<N> where
N: Sync,
N: Sync,
impl<N> Unpin for PointN<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for PointN<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, Right> ClosedAdd<Right> for T where
T: Add<Right, Output = T> + AddAssign<Right>,
T: Add<Right, Output = T> + AddAssign<Right>,
impl<T> ClosedNeg for T where
T: Neg<Output = T>,
T: Neg<Output = T>,
impl<T, Right> ClosedSub<Right> for T where
T: Sub<Right, Output = T> + SubAssign<Right>,
T: Sub<Right, Output = T> + SubAssign<Right>,
impl<T> CollisionObjectHandle for T where
T: 'static + PartialEq<T> + Eq + Send + Copy + Sync + Hash,
[src]
T: 'static + PartialEq<T> + Eq + Send + Copy + Sync + Hash,
impl<T> Compressible<BincodeLz4> for T where
T: DeserializeOwned + Serialize,
T: DeserializeOwned + Serialize,
type Compressed = BincodeLz4Compressed<T>
pub fn compress(
&self,
params: BincodeLz4
) -> <T as Compressible<BincodeLz4>>::Compressed
&self,
params: BincodeLz4
) -> <T as Compressible<BincodeLz4>>::Compressed
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<'a, F, N, T> ForEach<N, PointN<N>> for F where
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
[src]
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
type Data = T
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
impl<'a, F, N, T> ForEach<N, PointN<N>> for F where
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
[src]
F: Fn(&PointN<N>) -> T,
PointN<N>: Copy,
ExtentN<N>: IntegerExtent<N>,
type Data = T
pub fn for_each(
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
[src]
&self,
extent: &ExtentN<N>,
f: impl FnMut(PointN<N>, <F as ForEach<N, PointN<N>>>::Data)
)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<M> Measure for M where
M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,
[src]
M: Debug + PartialOrd<M> + Add<M, Output = M> + Default + Clone,
impl<T> Norm for T where
T: NormSquared,
[src]
T: NormSquared,
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<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,