PointN

Struct PointN 

Source
pub struct PointN<N>(pub N);
Expand description

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);

Tuple Fields§

§0: N

Implementations§

Source§

impl<T> PointN<[T; 2]>

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn axis_component_mut(&mut self, axis: Axis2) -> &mut T

Source§

impl<T> PointN<[T; 2]>
where T: Copy,

Source

pub fn axis_component(self, axis: Axis2) -> T

Source

pub fn x(self) -> T

Source

pub fn y(self) -> T

Source

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

Source§

impl PointN<[i32; 2]>

Source§

impl PointN<[f32; 2]>

Source

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

Returns the coordinates of the pixel containing self.

Source§

impl<T> PointN<[T; 3]>

Source

pub fn x_mut(&mut self) -> &mut T

Source

pub fn y_mut(&mut self) -> &mut T

Source

pub fn z_mut(&mut self) -> &mut T

Source

pub fn axis_component_mut(&mut self, axis: Axis3) -> &mut T

Source§

impl<T> PointN<[T; 3]>
where T: Copy,

Source

pub fn axis_component(self, axis: Axis3) -> T

Source

pub fn x(self) -> T

Source

pub fn y(self) -> T

Source

pub fn z(self) -> T

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source§

impl<T> PointN<[T; 3]>
where T: Mul<Output = T> + Sub<Output = T> + Copy,

Source

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

Source§

impl PointN<[i32; 3]>

Source§

impl PointN<[f32; 3]>

Source

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

Returns the coordinates of the voxel containing self.

Source§

impl<N> PointN<N>

Source

pub fn signum(self) -> PointN<N>

Trait Implementations§

Source§

impl<N> Abs for PointN<N>

Source§

fn abs(self) -> PointN<N>

Source§

impl<T> Add<PointN<T>> for ExtentN<T>
where PointN<T>: Add<Output = PointN<T>>,

Source§

type Output = ExtentN<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: PointN<T>) -> <ExtentN<T> as Add<PointN<T>>>::Output

Performs the + operation. Read more
Source§

impl<N, T> Add for PointN<N>
where PointN<N>: MapComponents<Scalar = T>, T: Add<Output = T>,

Source§

type Output = PointN<N>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: PointN<N>) -> <PointN<N> as Add>::Output

Performs the + operation. Read more
Source§

impl<T> AddAssign<PointN<T>> for ExtentN<T>
where ExtentN<T>: Copy + Add<PointN<T>, Output = ExtentN<T>>,

Source§

fn add_assign(&mut self, rhs: PointN<T>)

Performs the += operation. Read more
Source§

impl<N> AddAssign for PointN<N>
where PointN<N>: Copy + Add<Output = PointN<N>>,

Source§

fn add_assign(&mut self, rhs: PointN<N>)

Performs the += operation. Read more
Source§

impl BitAnd<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: i32) -> PointN<[i32; 2]>

Performs the & operation. Read more
Source§

impl BitAnd<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: i32) -> PointN<[i32; 3]>

Performs the & operation. Read more
Source§

impl BitAnd for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the & operation. Read more
Source§

impl BitAnd for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the & operation. Read more
Source§

impl BitOr<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: i32) -> PointN<[i32; 2]>

Performs the | operation. Read more
Source§

impl BitOr<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: i32) -> PointN<[i32; 3]>

Performs the | operation. Read more
Source§

impl BitOr for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the | operation. Read more
Source§

impl BitOr for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the | operation. Read more
Source§

impl BitXor<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: i32) -> PointN<[i32; 2]>

Performs the ^ operation. Read more
Source§

impl BitXor<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: i32) -> PointN<[i32; 3]>

Performs the ^ operation. Read more
Source§

impl BitXor for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the ^ operation. Read more
Source§

impl BitXor for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the ^ operation. Read more
Source§

impl<T> Bounded for PointN<[T; 2]>
where T: Bounded,

Source§

impl<T> Bounded for PointN<[T; 3]>
where T: Bounded,

Source§

impl Clamp for PointN<[f32; 2]>

Source§

fn clamp( &self, low: PointN<[f32; 2]>, high: PointN<[f32; 2]>, ) -> PointN<[f32; 2]>

Source§

impl Clamp for PointN<[f32; 3]>

Source§

fn clamp( &self, low: PointN<[f32; 3]>, high: PointN<[f32; 3]>, ) -> PointN<[f32; 3]>

Source§

impl<N> Clone for PointN<N>
where N: Clone,

Source§

fn clone(&self) -> PointN<N>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> ConstZero for PointN<[T; 2]>
where T: ConstZero,

Source§

impl<T> ConstZero for PointN<[T; 3]>
where T: ConstZero,

Source§

impl<N> Debug for PointN<N>
where N: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<N> Default for PointN<N>
where N: Default,

Source§

fn default() -> PointN<N>

Returns the “default value” for a type. Read more
Source§

impl<'de, N> Deserialize<'de> for PointN<N>
where N: Deserialize<'de>,

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<PointN<N>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Distance for PointN<[T; 2]>
where T: Add<Output = T> + Pow<u16, Output = T> + Copy + Signed, PointN<[T; 2]>: Point<Scalar = T>,

Source§

fn l1_distance(self, other: PointN<[T; 2]>) -> T

The L1 distance between points.
Source§

fn l2_distance_squared(self, other: PointN<[T; 2]>) -> T

The square of the L2 (Euclidean) distance between points.
Source§

impl<T> Distance for PointN<[T; 3]>
where T: Add<Output = T> + Pow<u16, Output = T> + Copy + Signed, PointN<[T; 3]>: Point<Scalar = T>,

Source§

fn l1_distance(self, other: PointN<[T; 3]>) -> T

The L1 distance between points.
Source§

fn l2_distance_squared(self, other: PointN<[T; 3]>) -> T

The square of the L2 (Euclidean) distance between points.
Source§

impl Div<f32> for PointN<[f32; 2]>

Source§

type Output = PointN<[f32; 2]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> PointN<[f32; 2]>

Performs the / operation. Read more
Source§

impl Div<f32> for PointN<[f32; 3]>

Source§

type Output = PointN<[f32; 3]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> PointN<[f32; 3]>

Performs the / operation. Read more
Source§

impl Div<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i32) -> PointN<[i32; 2]>

Performs the / operation. Read more
Source§

impl Div<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: i32) -> PointN<[i32; 3]>

Performs the / operation. Read more
Source§

impl Div for PointN<[f32; 2]>

Source§

type Output = PointN<[f32; 2]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PointN<[f32; 2]>) -> PointN<[f32; 2]>

Performs the / operation. Read more
Source§

impl Div for PointN<[f32; 3]>

Source§

type Output = PointN<[f32; 3]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PointN<[f32; 3]>) -> PointN<[f32; 3]>

Performs the / operation. Read more
Source§

impl Div for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the / operation. Read more
Source§

impl Div for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the / operation. Read more
Source§

impl<T> DotProduct for PointN<[T; 2]>
where T: Add<Output = T> + Mul<Output = T> + Copy,

Source§

type Scalar = T

Source§

fn dot(self, other: PointN<[T; 2]>) -> <PointN<[T; 2]> as DotProduct>::Scalar

The vector dot product.
Source§

impl<T> DotProduct for PointN<[T; 3]>
where T: Add<Output = T> + Mul<Output = T> + Copy,

Source§

type Scalar = T

Source§

fn dot(self, other: PointN<[T; 3]>) -> <PointN<[T; 3]> as DotProduct>::Scalar

The vector dot product.
Source§

impl<N> FloatPoint<N> for PointN<N>
where PointN<N>: IntoIntegerPoint + Point<Scalar = f32>,

Source§

fn round(self) -> PointN<N>

Source§

fn floor(self) -> PointN<N>

Source§

fn ceil(self) -> PointN<N>

Source§

fn fract(self) -> PointN<N>

Source§

fn floor_int(self) -> Self::IntPoint

Ensures that you floor before casting to integers, since this is not the default behavior for negative integers.
Source§

impl<N, T> ForEach<N, PointN<N>> for AmbientExtent<N, T>
where T: Clone, PointN<N>: IntegerPoint<N>,

Source§

type Item = T

Source§

fn for_each( &self, extent: &ExtentN<N>, f: impl FnMut(PointN<N>, <AmbientExtent<N, T> as ForEach<N, PointN<N>>>::Item), )

Source§

impl<N, Chan> ForEach<N, PointN<N>> for Array<N, Chan>
where Array<N, Chan>: Get<Stride>, N: ArrayIndexer<N>, PointN<N>: IntegerPoint<N>,

Source§

type Item = <Array<N, Chan> as Get<Stride>>::Item

Source§

fn for_each( &self, iter_extent: &ExtentN<N>, f: impl FnMut(PointN<N>, <Array<N, Chan> as ForEach<N, PointN<N>>>::Item), )

Source§

impl<Delegate, N, T, Bldr, Store> ForEach<N, PointN<N>> for ChunkMapLodView<Delegate>
where Delegate: Deref<Target = ChunkMap<N, T, Bldr, Store>>, PointN<N>: IntegerPoint<N>, Bldr: ChunkMapBuilder<N, T>, <<Bldr as ChunkMapBuilder<N, T>>::Chunk as Chunk>::Array: ForEach<N, PointN<N>, Item = T>, T: Clone, Store: ChunkReadStorage<N, <Bldr as ChunkMapBuilder<N, T>>::Chunk>,

Source§

type Item = T

Source§

fn for_each( &self, extent: &ExtentN<N>, f: impl FnMut(PointN<N>, <ChunkMapLodView<Delegate> as ForEach<N, PointN<N>>>::Item), )

Source§

impl<F, N, T> ForEach<N, PointN<N>> for Func<F>
where F: Fn(PointN<N>) -> T, PointN<N>: IntegerPoint<N>,

Source§

type Item = T

Source§

fn for_each( &self, extent: &ExtentN<N>, f: impl FnMut(PointN<N>, <Func<F> as ForEach<N, PointN<N>>>::Item), )

Source§

impl<'a, N, Chan> ForEachMut<'a, N, PointN<N>> for Array<N, Chan>
where Array<N, Chan>: ForEachMutPtr<N, PointN<N>, Item = <Chan as Channels>::Ptr>, Chan: Channels, <Chan as Channels>::Ptr: IntoMultiMut<'a>,

Source§

type Item = <<Chan as Channels>::Ptr as IntoMultiMut<'a>>::MultiMut

Source§

fn for_each_mut( &'a mut self, iter_extent: &ExtentN<N>, f: impl FnMut(PointN<N>, <Array<N, Chan> as ForEachMut<'a, N, PointN<N>>>::Item), )

Source§

impl<'a, Delegate, N, Mut, MutPtr> ForEachMut<'a, N, PointN<N>> for ChunkMapLodView<Delegate>
where ChunkMapLodView<Delegate>: ForEachMutPtr<N, PointN<N>, Item = MutPtr>, MutPtr: IntoMultiMut<'a, MultiMut = Mut>,

Source§

type Item = Mut

Source§

fn for_each_mut( &'a mut self, extent: &ExtentN<N>, f: impl FnMut(PointN<N>, <ChunkMapLodView<Delegate> as ForEachMut<'a, N, PointN<N>>>::Item), )

Source§

impl From<Matrix<f32, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<f32, 2, 1>>> for PointN<[f32; 2]>

Source§

fn from( p: Matrix<f32, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<f32, 2, 1>>, ) -> PointN<[f32; 2]>

Converts to this type from the input type.
Source§

impl From<Matrix<f32, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<f32, 3, 1>>> for PointN<[f32; 3]>

Source§

fn from( p: Matrix<f32, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<f32, 3, 1>>, ) -> PointN<[f32; 3]>

Converts to this type from the input type.
Source§

impl From<Matrix<i32, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<i32, 2, 1>>> for PointN<[i32; 2]>

Source§

fn from( p: Matrix<i32, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<i32, 2, 1>>, ) -> PointN<[i32; 2]>

Converts to this type from the input type.
Source§

impl From<Matrix<i32, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<i32, 3, 1>>> for PointN<[i32; 3]>

Source§

fn from( p: Matrix<i32, Const<nalgebra::::base::dimension::U3::{constant#0}>, Const<1>, ArrayStorage<i32, 3, 1>>, ) -> PointN<[i32; 3]>

Converts to this type from the input type.
Source§

impl From<Point<f32, 2>> for PointN<[f32; 2]>

Source§

fn from(p: Point<f32, 2>) -> PointN<[f32; 2]>

Converts to this type from the input type.
Source§

impl From<Point<f32, 3>> for PointN<[f32; 3]>

Source§

fn from(p: Point<f32, 3>) -> PointN<[f32; 3]>

Converts to this type from the input type.
Source§

impl From<Point<i32, 2>> for PointN<[i32; 2]>

Source§

fn from(p: Point<i32, 2>) -> PointN<[i32; 2]>

Converts to this type from the input type.
Source§

impl From<Point<i32, 3>> for PointN<[i32; 3]>

Source§

fn from(p: Point<i32, 3>) -> PointN<[i32; 3]>

Converts to this type from the input type.
Source§

impl<T> From<Point2<T>> for PointN<[T; 2]>

Source§

fn from(p: Point2<T>) -> PointN<[T; 2]>

Converts to this type from the input type.
Source§

impl<T> From<Point3<T>> for PointN<[T; 3]>

Source§

fn from(p: Point3<T>) -> PointN<[T; 3]>

Converts to this type from the input type.
Source§

impl From<PointN<[i32; 2]>> for PointN<[f32; 2]>

Source§

fn from(p: PointN<[i32; 2]>) -> PointN<[f32; 2]>

Converts to this type from the input type.
Source§

impl From<PointN<[i32; 3]>> for PointN<[f32; 3]>

Source§

fn from(p: PointN<[i32; 3]>) -> PointN<[f32; 3]>

Converts to this type from the input type.
Source§

impl From<Vec2> for PointN<[f32; 2]>

Source§

fn from(p: Vec2) -> PointN<[f32; 2]>

Converts to this type from the input type.
Source§

impl From<Vec3> for PointN<[f32; 3]>

Source§

fn from(p: Vec3) -> PointN<[f32; 3]>

Converts to this type from the input type.
Source§

impl From<Vec3A> for PointN<[f32; 3]>

Source§

fn from(p: Vec3A) -> PointN<[f32; 3]>

Converts to this type from the input type.
Source§

impl<T> From<Vector2<T>> for PointN<[T; 2]>

Source§

fn from(p: Vector2<T>) -> PointN<[T; 2]>

Converts to this type from the input type.
Source§

impl<T> From<Vector3<T>> for PointN<[T; 3]>

Source§

fn from(p: Vector3<T>) -> PointN<[T; 3]>

Converts to this type from the input type.
Source§

impl<N, Chan> Get<PointN<N>> for Array<N, Chan>
where Array<N, Chan>: IndexedArray<N> + Get<Local<N>>, PointN<N>: Point,

Source§

type Item = <Array<N, Chan> as Get<Local<N>>>::Item

Source§

fn get(&self, p: PointN<N>) -> <Array<N, Chan> as Get<PointN<N>>>::Item

Get an owned value at location.
Source§

impl<'a, Delegate, N, T, Bldr, Store> Get<PointN<N>> for ChunkMapLodView<Delegate>
where Delegate: Deref<Target = ChunkMap<N, T, Bldr, Store>>, PointN<N>: IntegerPoint<N>, T: Clone, Bldr: ChunkMapBuilder<N, T>, <<Bldr as ChunkMapBuilder<N, T>>::Chunk as Chunk>::Array: Get<PointN<N>, Item = T>, Store: ChunkReadStorage<N, <Bldr as ChunkMapBuilder<N, T>>::Chunk>,

Source§

type Item = T

Source§

fn get( &self, p: PointN<N>, ) -> <ChunkMapLodView<Delegate> as Get<PointN<N>>>::Item

Get an owned value at location.
Source§

impl<T> GetComponent for PointN<[T; 2]>
where T: Copy,

Source§

type Scalar = T

Source§

fn at(self, component_index: usize) -> T

Returns the component specified by index. I.e. X = 0, Y = 1, Z = 2.
Source§

impl<T> GetComponent for PointN<[T; 3]>
where T: Copy,

Source§

type Scalar = T

Source§

fn at(self, component_index: usize) -> T

Returns the component specified by index. I.e. X = 0, Y = 1, Z = 2.
Source§

impl<'a, N, Chan> GetMut<'a, PointN<N>> for Array<N, Chan>
where Array<N, Chan>: IndexedArray<N> + GetMut<'a, Local<N>>, PointN<N>: Point,

Source§

type Item = <Array<N, Chan> as GetMut<'a, Local<N>>>::Item

Source§

fn get_mut( &'a mut self, p: PointN<N>, ) -> <Array<N, Chan> as GetMut<'a, PointN<N>>>::Item

Get a mutable reference to the value at location.
Source§

impl<'a, Delegate, N, T, Bldr, Store, Mut> GetMut<'a, PointN<N>> for ChunkMapLodView<Delegate>
where T: 'a, Delegate: DerefMut<Target = ChunkMap<N, T, Bldr, Store>>, PointN<N>: IntegerPoint<N>, Bldr: 'a + ChunkMapBuilder<N, T>, <<Bldr as ChunkMapBuilder<N, T>>::Chunk as Chunk>::Array: GetMut<'a, PointN<N>, Item = Mut>, Store: 'a + ChunkWriteStorage<N, <Bldr as ChunkMapBuilder<N, T>>::Chunk>,

Source§

type Item = Mut

Source§

fn get_mut( &'a mut self, p: PointN<N>, ) -> <ChunkMapLodView<Delegate> as GetMut<'a, PointN<N>>>::Item

Get a mutable reference to the value at location.
Source§

impl<'a, N, Chan> GetRef<'a, PointN<N>> for Array<N, Chan>
where Array<N, Chan>: IndexedArray<N> + GetRef<'a, Local<N>>, PointN<N>: Point,

Source§

type Item = <Array<N, Chan> as GetRef<'a, Local<N>>>::Item

Source§

fn get_ref( &'a self, p: PointN<N>, ) -> <Array<N, Chan> as GetRef<'a, PointN<N>>>::Item

Get an immutable reference to the value at location.
Source§

impl<'a, Delegate, N, T, Bldr, Store, Ref> GetRef<'a, PointN<N>> for ChunkMapLodView<Delegate>
where T: 'a, Delegate: Deref<Target = ChunkMap<N, T, Bldr, Store>>, PointN<N>: IntegerPoint<N>, Bldr: 'a + ChunkMapBuilder<N, T>, <<Bldr as ChunkMapBuilder<N, T>>::Chunk as Chunk>::Array: GetRef<'a, PointN<N>, Item = Ref>, Store: 'a + ChunkReadStorage<N, <Bldr as ChunkMapBuilder<N, T>>::Chunk>, Ref: MultiRef<'a, Data = T>,

Source§

type Item = Ref

Source§

fn get_ref( &'a self, p: PointN<N>, ) -> <ChunkMapLodView<Delegate> as GetRef<'a, PointN<N>>>::Item

Get an immutable reference to the value at location.
Source§

impl<N> Hash for PointN<N>
where N: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntegerDiv for PointN<[i32; 2]>

Source§

fn vector_div_floor(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Source§

fn scalar_div_floor(self, rhs: i32) -> PointN<[i32; 2]>

Source§

fn vector_div_ceil(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Source§

fn scalar_div_ceil(self, rhs: i32) -> PointN<[i32; 2]>

Source§

impl IntegerDiv for PointN<[i32; 3]>

Source§

fn vector_div_floor(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Source§

fn scalar_div_floor(self, rhs: i32) -> PointN<[i32; 3]>

Source§

fn vector_div_ceil(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Source§

fn scalar_div_ceil(self, rhs: i32) -> PointN<[i32; 3]>

Source§

impl IntegerPoint<[i32; 2]> for PointN<[i32; 2]>

Source§

fn dimensions_are_powers_of_2(self) -> bool

Returns true iff all dimensions are powers of 2.
Source§

fn is_cube(self) -> bool

Returns true iff all dimensions are equal.
Source§

impl IntegerPoint<[i32; 3]> for PointN<[i32; 3]>

Source§

fn dimensions_are_powers_of_2(self) -> bool

Returns true iff all dimensions are powers of 2.
Source§

fn is_cube(self) -> bool

Returns true iff all dimensions are equal.
Source§

impl IntoIntegerPoint for PointN<[f32; 2]>

Source§

impl IntoIntegerPoint for PointN<[f32; 3]>

Source§

impl IterExtent<[i32; 2]> for PointN<[i32; 2]>

Source§

impl IterExtent<[i32; 3]> for PointN<[i32; 3]>

Source§

impl LatticeOrder for PointN<[f32; 2]>

Source§

fn join(self, other: PointN<[f32; 2]>) -> PointN<[f32; 2]>

Component-wise maximum.
Source§

fn meet(self, other: PointN<[f32; 2]>) -> PointN<[f32; 2]>

Component-wise minimum.
Source§

impl LatticeOrder for PointN<[f32; 3]>

Source§

fn join(self, other: PointN<[f32; 3]>) -> PointN<[f32; 3]>

Component-wise maximum.
Source§

fn meet(self, other: PointN<[f32; 3]>) -> PointN<[f32; 3]>

Component-wise minimum.
Source§

impl LatticeOrder for PointN<[i32; 2]>

Source§

fn join(self, other: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Component-wise maximum.
Source§

fn meet(self, other: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Component-wise minimum.
Source§

impl LatticeOrder for PointN<[i32; 3]>

Source§

fn join(self, other: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Component-wise maximum.
Source§

fn meet(self, other: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Component-wise minimum.
Source§

impl<T> MapComponents for PointN<[T; 2]>
where T: Copy,

Source§

type Scalar = T

Source§

fn map_components_unary( self, f: impl Fn(<PointN<[T; 2]> as MapComponents>::Scalar) -> <PointN<[T; 2]> as MapComponents>::Scalar, ) -> PointN<[T; 2]>

Returns the point after applying f component-wise.
Source§

fn map_components_binary( self, other: PointN<[T; 2]>, f: impl Fn(<PointN<[T; 2]> as MapComponents>::Scalar, <PointN<[T; 2]> as MapComponents>::Scalar) -> <PointN<[T; 2]> as MapComponents>::Scalar, ) -> PointN<[T; 2]>

Returns the point after applying f component-wise to both self and other in parallel.
Source§

impl<T> MapComponents for PointN<[T; 3]>
where T: Copy,

Source§

type Scalar = T

Source§

fn map_components_unary( self, f: impl Fn(<PointN<[T; 3]> as MapComponents>::Scalar) -> <PointN<[T; 3]> as MapComponents>::Scalar, ) -> PointN<[T; 3]>

Returns the point after applying f component-wise.
Source§

fn map_components_binary( self, other: PointN<[T; 3]>, f: impl Fn(<PointN<[T; 3]> as MapComponents>::Scalar, <PointN<[T; 3]> as MapComponents>::Scalar) -> <PointN<[T; 3]> as MapComponents>::Scalar, ) -> PointN<[T; 3]>

Returns the point after applying f component-wise to both self and other in parallel.
Source§

impl MaxMin for PointN<[f32; 2]>

Source§

fn max(&self, other: PointN<[f32; 2]>) -> PointN<[f32; 2]>

Source§

fn min(&self, other: PointN<[f32; 2]>) -> PointN<[f32; 2]>

Source§

impl MaxMin for PointN<[f32; 3]>

Source§

fn max(&self, other: PointN<[f32; 3]>) -> PointN<[f32; 3]>

Source§

fn min(&self, other: PointN<[f32; 3]>) -> PointN<[f32; 3]>

Source§

impl MinMaxComponent for PointN<[f32; 2]>

Source§

impl MinMaxComponent for PointN<[f32; 3]>

Source§

impl MinMaxComponent for PointN<[i32; 2]>

Source§

impl MinMaxComponent for PointN<[i32; 3]>

Source§

impl<T> Mul<PointN<T>> for ExtentN<T>
where PointN<T>: Copy + Mul<Output = PointN<T>>,

Source§

type Output = ExtentN<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PointN<T>) -> <ExtentN<T> as Mul<PointN<T>>>::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for PointN<[f32; 2]>

Source§

type Output = PointN<[f32; 2]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> PointN<[f32; 2]>

Performs the * operation. Read more
Source§

impl Mul<f32> for PointN<[f32; 3]>

Source§

type Output = PointN<[f32; 3]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> PointN<[f32; 3]>

Performs the * operation. Read more
Source§

impl Mul<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> PointN<[i32; 2]>

Performs the * operation. Read more
Source§

impl Mul<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> PointN<[i32; 3]>

Performs the * operation. Read more
Source§

impl Mul for PointN<[f32; 2]>

Source§

type Output = PointN<[f32; 2]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PointN<[f32; 2]>) -> PointN<[f32; 2]>

Performs the * operation. Read more
Source§

impl Mul for PointN<[f32; 3]>

Source§

type Output = PointN<[f32; 3]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PointN<[f32; 3]>) -> PointN<[f32; 3]>

Performs the * operation. Read more
Source§

impl Mul for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the * operation. Read more
Source§

impl Mul for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the * operation. Read more
Source§

impl<N> Neg for PointN<N>
where PointN<N>: Copy + Sub<Output = PointN<N>> + Zero,

Source§

type Output = PointN<N>

The resulting type after applying the - operator.
Source§

fn neg(self) -> <PointN<N> as Neg>::Output

Performs the unary - operation. Read more
Source§

impl Neighborhoods for PointN<[i32; 2]>

Source§

impl Neighborhoods for PointN<[i32; 3]>

Source§

impl Norm for PointN<[f32; 2]>

Source§

fn norm_squared(self) -> f32

Source§

fn norm(self) -> f32

Source§

impl Norm for PointN<[f32; 3]>

Source§

fn norm_squared(self) -> f32

Source§

fn norm(self) -> f32

Source§

impl Norm for PointN<[i32; 2]>

Source§

fn norm_squared(self) -> f32

Source§

fn norm(self) -> f32

Source§

impl Norm for PointN<[i32; 3]>

Source§

fn norm_squared(self) -> f32

Source§

fn norm(self) -> f32

Source§

impl Not for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the ! operator.
Source§

fn not(self) -> PointN<[i32; 2]>

Performs the unary ! operation. Read more
Source§

impl Not for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the ! operator.
Source§

fn not(self) -> PointN<[i32; 3]>

Performs the unary ! operation. Read more
Source§

impl One for PointN<[f32; 2]>

Source§

fn one() -> PointN<[f32; 2]>

Source§

impl One for PointN<[f32; 3]>

Source§

fn one() -> PointN<[f32; 3]>

Source§

impl<T> Ones for PointN<[T; 2]>
where T: ConstOne,

Source§

const ONES: PointN<[T; 2]>

A point of all ones.
Source§

impl<T> Ones for PointN<[T; 3]>
where T: ConstOne,

Source§

const ONES: PointN<[T; 3]>

A point of all ones.
Source§

impl<N> PartialEq for PointN<N>
where N: PartialEq,

Source§

fn eq(&self, other: &PointN<N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialOrd for PointN<[T; 2]>
where T: Copy + PartialOrd,

Source§

fn partial_cmp(&self, other: &PointN<[T; 2]>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &PointN<[T; 2]>) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn gt(&self, other: &PointN<[T; 2]>) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

fn le(&self, other: &PointN<[T; 2]>) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn ge(&self, other: &PointN<[T; 2]>) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> PartialOrd for PointN<[T; 3]>
where T: Copy + PartialOrd,

Source§

fn partial_cmp(&self, other: &PointN<[T; 3]>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &PointN<[T; 3]>) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn gt(&self, other: &PointN<[T; 3]>) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
Source§

fn le(&self, other: &PointN<[T; 3]>) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
Source§

fn ge(&self, other: &PointN<[T; 3]>) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Point for PointN<[f32; 2]>

Source§

type Scalar = f32

Source§

fn fill(value: f32) -> PointN<[f32; 2]>

Source§

fn basis() -> Vec<PointN<[f32; 2]>>

Source§

fn volume(self) -> <PointN<[f32; 2]> as Point>::Scalar

Source§

impl Point for PointN<[f32; 3]>

Source§

type Scalar = f32

Source§

fn fill(value: f32) -> PointN<[f32; 3]>

Source§

fn basis() -> Vec<PointN<[f32; 3]>>

Source§

fn volume(self) -> <PointN<[f32; 3]> as Point>::Scalar

Source§

impl Point for PointN<[i32; 2]>

Source§

type Scalar = i32

Source§

fn fill(value: i32) -> PointN<[i32; 2]>

Source§

fn basis() -> Vec<PointN<[i32; 2]>>

Source§

fn volume(self) -> <PointN<[i32; 2]> as Point>::Scalar

Source§

impl Point for PointN<[i32; 3]>

Source§

type Scalar = i32

Source§

fn fill(value: i32) -> PointN<[i32; 3]>

Source§

fn basis() -> Vec<PointN<[i32; 3]>>

Source§

fn volume(self) -> <PointN<[i32; 3]> as Point>::Scalar

Source§

impl Rem<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: i32) -> PointN<[i32; 2]>

Performs the % operation. Read more
Source§

impl Rem<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: i32) -> PointN<[i32; 3]>

Performs the % operation. Read more
Source§

impl Rem for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the % operator.
Source§

fn rem(self, other: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the % operation. Read more
Source§

impl Rem for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the % operator.
Source§

fn rem(self, other: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the % operation. Read more
Source§

impl<N> Serialize for PointN<N>
where N: Serialize,

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Shl<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i32) -> PointN<[i32; 2]>

Performs the << operation. Read more
Source§

impl Shl<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: i32) -> PointN<[i32; 3]>

Performs the << operation. Read more
Source§

impl Shl for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the << operation. Read more
Source§

impl Shl for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the << operation. Read more
Source§

impl Shr<i32> for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i32) -> PointN<[i32; 2]>

Performs the >> operation. Read more
Source§

impl Shr<i32> for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: i32) -> PointN<[i32; 3]>

Performs the >> operation. Read more
Source§

impl Shr for PointN<[i32; 2]>

Source§

type Output = PointN<[i32; 2]>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: PointN<[i32; 2]>) -> PointN<[i32; 2]>

Performs the >> operation. Read more
Source§

impl Shr for PointN<[i32; 3]>

Source§

type Output = PointN<[i32; 3]>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: PointN<[i32; 3]>) -> PointN<[i32; 3]>

Performs the >> operation. Read more
Source§

impl<T> Sub<PointN<T>> for ExtentN<T>
where PointN<T>: Sub<Output = PointN<T>>,

Source§

type Output = ExtentN<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PointN<T>) -> <ExtentN<T> as Sub<PointN<T>>>::Output

Performs the - operation. Read more
Source§

impl<N, T> Sub for PointN<N>
where PointN<N>: MapComponents<Scalar = T>, T: Sub<Output = T>,

Source§

type Output = PointN<N>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PointN<N>) -> <PointN<N> as Sub>::Output

Performs the - operation. Read more
Source§

impl<T> SubAssign<PointN<T>> for ExtentN<T>
where ExtentN<T>: Copy + Sub<PointN<T>, Output = ExtentN<T>>,

Source§

fn sub_assign(&mut self, rhs: PointN<T>)

Performs the -= operation. Read more
Source§

impl<N> SubAssign for PointN<N>
where PointN<N>: Copy + Sub<Output = PointN<N>>,

Source§

fn sub_assign(&mut self, rhs: PointN<N>)

Performs the -= operation. Read more
Source§

impl Vec<f32> for PointN<[f32; 2]>

Source§

type Dimension = Dim3D

Source§

type Vec2 = PointN<[f32; 2]>

Source§

type Vec3 = PointN<[f32; 3]>

Source§

fn dot(&self, other: PointN<[f32; 2]>) -> f32

Source§

fn abs(&self) -> PointN<[f32; 2]>

Source§

fn normalized(&self) -> PointN<[f32; 2]>

Source§

fn magnitude(&self) -> f32

Source§

impl Vec<f32> for PointN<[f32; 3]>

Source§

type Dimension = Dim3D

Source§

type Vec2 = PointN<[f32; 2]>

Source§

type Vec3 = PointN<[f32; 3]>

Source§

fn dot(&self, other: PointN<[f32; 3]>) -> f32

Source§

fn abs(&self) -> PointN<[f32; 3]>

Source§

fn normalized(&self) -> PointN<[f32; 3]>

Source§

fn magnitude(&self) -> f32

Source§

impl Vec2<f32> for PointN<[f32; 2]>

Source§

fn new(x: f32, y: f32) -> PointN<[f32; 2]>

Source§

fn x(&self) -> f32

Source§

fn y(&self) -> f32

Source§

impl Vec3<f32> for PointN<[f32; 3]>

Source§

fn new(x: f32, y: f32, z: f32) -> PointN<[f32; 3]>

Source§

fn x(&self) -> f32

Source§

fn y(&self) -> f32

Source§

fn z(&self) -> f32

Source§

impl Zero for PointN<[f32; 2]>

Source§

fn zero() -> PointN<[f32; 2]>

Source§

impl Zero for PointN<[f32; 3]>

Source§

fn zero() -> PointN<[f32; 3]>

Source§

impl<N> Zero for PointN<N>
where PointN<N>: Point + ConstZero,

Source§

fn zero() -> PointN<N>

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<N> Copy for PointN<N>
where N: Copy,

Source§

impl<N> Eq for PointN<N>
where N: Eq,

Source§

impl<N> StructuralPartialEq for PointN<N>

Auto Trait Implementations§

§

impl<N> Freeze for PointN<N>
where N: Freeze,

§

impl<N> RefUnwindSafe for PointN<N>
where N: RefUnwindSafe,

§

impl<N> Send for PointN<N>
where N: Send,

§

impl<N> Sync for PointN<N>
where N: Sync,

§

impl<N> Unpin for PointN<N>
where N: Unpin,

§

impl<N> UnwindSafe for PointN<N>
where N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CallHasher for T
where T: Hash + ?Sized,

Source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

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

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Lerp for T
where T: Sub<Output = T> + Copy + Add<Output = T> + Mul<Output = T> + One,

Source§

fn lerp(&self, other: T, factor: T) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: Copy + PartialEq + Debug + Any,

Source§

fn inlined_clone(&self) -> T

Performance hack: Clone doesn’t get inlined for Copy types in debug mode, so make it inline anyway.
Source§

fn is<T>() -> bool
where T: Scalar,

Tests if Self the same as the type T Read more
Source§

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

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T> CollisionObjectHandle for T
where T: Copy + Hash + PartialEq + Eq + 'static + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<M> Measure for M
where M: Debug + PartialOrd + Add<Output = M> + Default + Clone,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,