pub type Point<T, const D: usize> = OPoint<T, Const<D>>;
Expand description
A point with D
elements.
Implementations§
source§impl<T: Scalar, const D: usize> Point<T, D>where
Const<D>: ToTypenum,
impl<T: Scalar, const D: usize> Point<T, D>where Const<D>: ToTypenum,
sourcepub fn xx(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U0, Output = Greater>,
pub fn xx(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U0, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xxx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U0, Output = Greater>,
pub fn xxx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U0, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xy(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn xy(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yx(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn yx(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yy(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn yy(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xxy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn xxy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xyx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn xyx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xyy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn xyy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yxx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn yxx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yxy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn yxy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yyx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn yyx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yyy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
pub fn yyy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U1, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xz(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn xz(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yz(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn yz(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zx(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zx(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zy(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zy(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zz(&self) -> Point2<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zz(&self) -> Point2<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xxz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn xxz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xyz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn xyz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xzx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn xzx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xzy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn xzy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn xzz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn xzz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yxz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn yxz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yyz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn yyz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yzx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn yzx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yzy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn yzy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn yzz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn yzz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zxx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zxx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zxy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zxy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zxz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zxz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zyx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zyx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zyy(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zyy(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zyz(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zyz(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
sourcepub fn zzx(&self) -> Point3<T>where
<Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
pub fn zzx(&self) -> Point3<T>where <Const<D> as ToTypenum>::Typenum: Cmp<U2, Output = Greater>,
Builds a new point from components of self
.
Trait Implementations§
source§impl<T, const D: usize> AffineSpace for Point<T, D>where
T: Scalar + Field,
impl<T, const D: usize> AffineSpace for Point<T, D>where T: Scalar + Field,
§type Translation = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
type Translation = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
source§fn translate_by(&self, t: &Self::Translation) -> Self
fn translate_by(&self, t: &Self::Translation) -> Self
*self + *t
. Applies the additive group action of this affine space’s associated
vector space on self
.source§fn subtract(&self, right: &Self) -> Self::Translation
fn subtract(&self, right: &Self) -> Self::Translation
*self - *other
. Returns the unique element v
of the associated vector space
such that self = right + v
.source§impl<T: RealField + RealField, const D: usize> EuclideanSpace for Point<T, D>
impl<T: RealField + RealField, const D: usize> EuclideanSpace for Point<T, D>
§type Coordinates = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
type Coordinates = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
source§fn coordinates(&self) -> Self::Coordinates
fn coordinates(&self) -> Self::Coordinates
source§fn from_coordinates(coords: Self::Coordinates) -> Self
fn from_coordinates(coords: Self::Coordinates) -> Self
source§fn distance_squared(&self, b: &Self) -> Self::RealField
fn distance_squared(&self, b: &Self) -> Self::RealField
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 16]> for Point<T, D>where
T: From<[<T as SimdValue>::Element; 16]> + Scalar + Copy + PrimitiveSimdValue,
T::Element: Scalar + Copy,
<DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 16]> for Point<T, D>where T: From<[<T as SimdValue>::Element; 16]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy, <DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 2]> for Point<T, D>where
T: From<[<T as SimdValue>::Element; 2]> + Scalar + Copy + PrimitiveSimdValue,
T::Element: Scalar + Copy,
<DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 2]> for Point<T, D>where T: From<[<T as SimdValue>::Element; 2]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy, <DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 4]> for Point<T, D>where
T: From<[<T as SimdValue>::Element; 4]> + Scalar + Copy + PrimitiveSimdValue,
T::Element: Scalar + Copy,
<DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 4]> for Point<T, D>where T: From<[<T as SimdValue>::Element; 4]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy, <DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 8]> for Point<T, D>where
T: From<[<T as SimdValue>::Element; 8]> + Scalar + Copy + PrimitiveSimdValue,
T::Element: Scalar + Copy,
<DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 8]> for Point<T, D>where T: From<[<T as SimdValue>::Element; 8]> + Scalar + Copy + PrimitiveSimdValue, T::Element: Scalar + Copy, <DefaultAllocator as Allocator<T::Element, Const<D>>>::Buffer: Copy,
source§impl<T, const D: usize> JoinSemilattice for Point<T, D>where
T: Scalar + JoinSemilattice,
impl<T, const D: usize> JoinSemilattice for Point<T, D>where T: Scalar + JoinSemilattice,
source§impl<T, const D: usize> Lattice for Point<T, D>where
T: Scalar + Lattice,
impl<T, const D: usize> Lattice for Point<T, D>where T: Scalar + Lattice,
source§fn meet_join(&self, other: &Self) -> (Self, Self)
fn meet_join(&self, other: &Self) -> (Self, Self)
source§fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
self
and other
if they are comparable.source§fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
self
and other
if they are comparable.source§impl<T, const D: usize> MeetSemilattice for Point<T, D>where
T: Scalar + MeetSemilattice,
impl<T, const D: usize> MeetSemilattice for Point<T, D>where T: Scalar + MeetSemilattice,
source§impl<T: Scalar + SimdValue, const D: usize> SimdValue for Point<T, D>where
T::Element: Scalar,
impl<T: Scalar + SimdValue, const D: usize> SimdValue for Point<T, D>where T::Element: Scalar,
§type Element = OPoint<<T as SimdValue>::Element, Const<D>>
type Element = OPoint<<T as SimdValue>::Element, Const<D>>
§type SimdBool = <T as SimdValue>::SimdBool
type SimdBool = <T as SimdValue>::SimdBool
self
.source§unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
self
without bound-checking.source§unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element)
self
by val
without bound-checking.