pub type Point<T, const D: usize> = OPoint<T, Const<D>>;
Expand description
A point with D
elements.
Aliased Type§
struct Point<T, const D: usize> {
pub coords: Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<T, Const<D>>>::Buffer>,
}
Fields§
§coords: Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<T, Const<D>>>::Buffer>
The coordinates of this point, i.e., the shift from the origin.
Implementations§
source§impl<T: Scalar, const D: usize> Point<T, D>
impl<T: Scalar, const D: usize> Point<T, D>
§Swizzling
Trait Implementations§
source§impl<T, const D: usize> AffineSpace for Point<T, D>
impl<T, const D: usize> AffineSpace for Point<T, D>
§type Translation = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
type Translation = Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
The associated vector space.
source§fn translate_by(&self, t: &Self::Translation) -> Self
fn translate_by(&self, t: &Self::Translation) -> Self
Same as
*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
Same as
*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>>
The underlying finite vector space.
source§fn coordinates(&self) -> Self::Coordinates
fn coordinates(&self) -> Self::Coordinates
The coordinates of this point, i.e., the translation from the origin.
source§fn from_coordinates(coords: Self::Coordinates) -> Self
fn from_coordinates(coords: Self::Coordinates) -> Self
Builds a point from its coordinates relative to the origin.
source§fn distance_squared(&self, b: &Self) -> Self::RealField
fn distance_squared(&self, b: &Self) -> Self::RealField
The distance between two points.
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 16]> for Point<T, D>
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 16]> for Point<T, D>
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 2]> for Point<T, D>
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 2]> for Point<T, D>
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 4]> for Point<T, D>
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 4]> for Point<T, D>
source§impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 8]> for Point<T, D>
impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 8]> for Point<T, D>
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>
impl<T, const D: usize> Lattice for Point<T, D>
source§fn meet_join(&self, other: &Self) -> (Self, Self)
fn meet_join(&self, other: &Self) -> (Self, Self)
Returns the infimum and the supremum simultaneously.
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>
Return the minimum of
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>
Return the maximum of
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>
impl<T: Scalar + SimdValue, const D: usize> SimdValue for Point<T, D>
§type Element = OPoint<<T as SimdValue>::Element, Const<D>>
type Element = OPoint<<T as SimdValue>::Element, Const<D>>
The type of the elements of each lane of this SIMD value.
§type SimdBool = <T as SimdValue>::SimdBool
type SimdBool = <T as SimdValue>::SimdBool
Type of the result of comparing two SIMD values like
self
.source§unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
unsafe fn extract_unchecked(&self, i: usize) -> Self::Element
Extracts the i-th lane of
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)
Replaces the i-th lane of
self
by val
without bound-checking.