pub type Point3<T> = OPoint<T, Const<3>>;
Expand description

A statically sized 3-dimensional column point.

Because this is an alias, not all its methods are listed here. See the Point type too.

Aliased Type§

struct Point3<T> {
    pub coords: Matrix<T, Const<3>, Const<1>, <DefaultAllocator as Allocator<T, Const<3>, Const<1>>>::Buffer>,
}

Fields§

§coords: Matrix<T, Const<3>, Const<1>, <DefaultAllocator as Allocator<T, Const<3>, Const<1>>>::Buffer>

The coordinates of this point, i.e., the shift from the origin.

Implementations§

source§

impl<T, D> OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source

pub fn map<T2, F>(&self, f: F) -> OPoint<T2, D>where T2: Scalar, F: FnMut(T) -> T2, DefaultAllocator: Allocator<T2, D, Const<1>>,

Returns a point containing the result of f applied to each of its entries.

Example
let p = Point2::new(1.0, 2.0);
assert_eq!(p.map(|e| e * 10.0), Point2::new(10.0, 20.0));

// This works in any dimension.
let p = Point3::new(1.1, 2.1, 3.1);
assert_eq!(p.map(|e| e as u32), Point3::new(1, 2, 3));
source

pub fn apply<F>(&mut self, f: F)where F: FnMut(&mut T),

Replaces each component of self by the result of a closure f applied on it.

Example
let mut p = Point2::new(1.0, 2.0);
p.apply(|e| *e = *e * 10.0);
assert_eq!(p, Point2::new(10.0, 20.0));

// This works in any dimension.
let mut p = Point3::new(1.0, 2.0, 3.0);
p.apply(|e| *e = *e * 10.0);
assert_eq!(p, Point3::new(10.0, 20.0, 30.0));
source

pub fn to_homogeneous( &self ) -> Matrix<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer>where T: One, D: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>>,

Converts this point into a vector in homogeneous coordinates, i.e., appends a 1 at the end of it.

This is the same as .into().

Example
let p = Point2::new(10.0, 20.0);
assert_eq!(p.to_homogeneous(), Vector3::new(10.0, 20.0, 1.0));

// This works in any dimension.
let p = Point3::new(10.0, 20.0, 30.0);
assert_eq!(p.to_homogeneous(), Vector4::new(10.0, 20.0, 30.0, 1.0));
source

pub fn from_coordinates( coords: Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer> ) -> OPoint<T, D>

👎Deprecated: Use Point::from(vector) instead.

Creates a new point with the given coordinates.

source

pub fn len(&self) -> usize

The dimension of this point.

Example
let p = Point2::new(1.0, 2.0);
assert_eq!(p.len(), 2);

// This works in any dimension.
let p = Point3::new(10.0, 20.0, 30.0);
assert_eq!(p.len(), 3);
source

pub fn is_empty(&self) -> bool

Returns true if the point contains no elements.

Example
let p = Point2::new(1.0, 2.0);
assert!(!p.is_empty());
source

pub fn stride(&self) -> usize

👎Deprecated: This methods is no longer significant and will always return 1.

The stride of this point. This is the number of buffer element separating each component of this point.

source

pub fn iter( &self ) -> MatrixIter<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>

Iterates through this point coordinates.

Example
let p = Point3::new(1.0, 2.0, 3.0);
let mut it = p.iter().cloned();

assert_eq!(it.next(), Some(1.0));
assert_eq!(it.next(), Some(2.0));
assert_eq!(it.next(), Some(3.0));
assert_eq!(it.next(), None);
source

pub unsafe fn get_unchecked(&self, i: usize) -> &T

Gets a reference to i-th element of this point without bound-checking.

source

pub fn iter_mut( &mut self ) -> MatrixIterMut<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>

Mutably iterates through this point coordinates.

Example
let mut p = Point3::new(1.0, 2.0, 3.0);

for e in p.iter_mut() {
    *e *= 10.0;
}

assert_eq!(p, Point3::new(10.0, 20.0, 30.0));
source

pub unsafe fn get_unchecked_mut(&mut self, i: usize) -> &mut T

Gets a mutable reference to i-th element of this point without bound-checking.

source

pub unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)

Swaps two entries without bound-checking.

source§

impl<T, D> OPoint<T, D>where T: Scalar + SimdPartialOrd, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source

pub fn inf(&self, other: &OPoint<T, D>) -> OPoint<T, D>

Computes the infimum (aka. componentwise min) of two points.

source

pub fn sup(&self, other: &OPoint<T, D>) -> OPoint<T, D>

Computes the supremum (aka. componentwise max) of two points.

source

pub fn inf_sup(&self, other: &OPoint<T, D>) -> (OPoint<T, D>, OPoint<T, D>)

Computes the (infimum, supremum) of two points.

source§

impl<T, D> OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source

pub fn origin() -> OPoint<T, D>where T: Zero,

Creates a new point with all coordinates equal to zero.

Example
// This works in any dimension.
// The explicit crate::<f32> type annotation may not always be needed,
// depending on the context of type inference.
let pt = Point2::<f32>::origin();
assert!(pt.x == 0.0 && pt.y == 0.0);

let pt = Point3::<f32>::origin();
assert!(pt.x == 0.0 && pt.y == 0.0 && pt.z == 0.0);
source

pub fn from_slice(components: &[T]) -> OPoint<T, D>

Creates a new point from a slice.

Example
let data = [ 1.0, 2.0, 3.0 ];

let pt = Point2::from_slice(&data[..2]);
assert_eq!(pt, Point2::new(1.0, 2.0));

let pt = Point3::from_slice(&data);
assert_eq!(pt, Point3::new(1.0, 2.0, 3.0));
source

pub fn from_homogeneous( v: Matrix<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer> ) -> Option<OPoint<T, D>>where T: Scalar + Zero + One + ClosedDiv<T>, D: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>>,

Creates a new point from its homogeneous vector representation.

In practice, this builds a D-dimensional points with the same first D component as v divided by the last component of v. Returns None if this divisor is zero.

Example

let coords = Vector4::new(1.0, 2.0, 3.0, 1.0);
let pt = Point3::from_homogeneous(coords);
assert_eq!(pt, Some(Point3::new(1.0, 2.0, 3.0)));

// All component of the result will be divided by the
// last component of the vector, here 2.0.
let coords = Vector4::new(1.0, 2.0, 3.0, 2.0);
let pt = Point3::from_homogeneous(coords);
assert_eq!(pt, Some(Point3::new(0.5, 1.0, 1.5)));

// Fails because the last component is zero.
let coords = Vector4::new(1.0, 2.0, 3.0, 0.0);
let pt = Point3::from_homogeneous(coords);
assert!(pt.is_none());

// Works also in other dimensions.
let coords = Vector3::new(1.0, 2.0, 1.0);
let pt = Point2::from_homogeneous(coords);
assert_eq!(pt, Some(Point2::new(1.0, 2.0)));
source

pub fn cast<To>(self) -> OPoint<To, D>where To: Scalar, OPoint<To, D>: SupersetOf<OPoint<T, D>>, DefaultAllocator: Allocator<To, D, Const<1>>,

Cast the components of self to another type.

Example
let pt = Point2::new(1.0f64, 2.0);
let pt2 = pt.cast::<f32>();
assert_eq!(pt2, Point2::new(1.0f32, 2.0));
source§

impl<T> OPoint<T, Const<3>>where T: Scalar,

source

pub fn new(x: T, y: T, z: T) -> OPoint<T, Const<3>>

Initializes this point from its components.

Example
let p = Point3::new(1.0, 2.0, 3.0);
assert!(p.x == 1.0 && p.y == 2.0 && p.z == 3.0);
source§

impl<T, const D: usize> OPoint<T, Const<D>>where T: Scalar, Const<D>: ToTypenum,

source

pub fn xx(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

Builds a new point from components of self.

source

pub fn xxx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

Builds a new point from components of self.

source

pub fn xy(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yx(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yy(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xxy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xyx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xyy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yxx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yxy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yyx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yyy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xz(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yz(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zx(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zy(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zz(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xxz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xyz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xzx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xzy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xzz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yxz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yyz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yzx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yzy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yzz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zxx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zxy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zxz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zyx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zyy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zyz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zzx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zzy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zzz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

Methods from Deref<Target = XY<T>>§

source

pub fn map<T2, F>(&self, f: F) -> OPoint<T2, D>where T2: Scalar, F: FnMut(T) -> T2, DefaultAllocator: Allocator<T2, D, Const<1>>,

Returns a point containing the result of f applied to each of its entries.

Example
let p = Point2::new(1.0, 2.0);
assert_eq!(p.map(|e| e * 10.0), Point2::new(10.0, 20.0));

// This works in any dimension.
let p = Point3::new(1.1, 2.1, 3.1);
assert_eq!(p.map(|e| e as u32), Point3::new(1, 2, 3));
source

pub fn apply<F>(&mut self, f: F)where F: FnMut(&mut T),

Replaces each component of self by the result of a closure f applied on it.

Example
let mut p = Point2::new(1.0, 2.0);
p.apply(|e| *e = *e * 10.0);
assert_eq!(p, Point2::new(10.0, 20.0));

// This works in any dimension.
let mut p = Point3::new(1.0, 2.0, 3.0);
p.apply(|e| *e = *e * 10.0);
assert_eq!(p, Point3::new(10.0, 20.0, 30.0));
source

pub fn to_homogeneous( &self ) -> Matrix<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer>where T: One, D: DimNameAdd<Const<1>>, DefaultAllocator: Allocator<T, <D as DimNameAdd<Const<1>>>::Output, Const<1>>,

Converts this point into a vector in homogeneous coordinates, i.e., appends a 1 at the end of it.

This is the same as .into().

Example
let p = Point2::new(10.0, 20.0);
assert_eq!(p.to_homogeneous(), Vector3::new(10.0, 20.0, 1.0));

// This works in any dimension.
let p = Point3::new(10.0, 20.0, 30.0);
assert_eq!(p.to_homogeneous(), Vector4::new(10.0, 20.0, 30.0, 1.0));
source

pub fn len(&self) -> usize

The dimension of this point.

Example
let p = Point2::new(1.0, 2.0);
assert_eq!(p.len(), 2);

// This works in any dimension.
let p = Point3::new(10.0, 20.0, 30.0);
assert_eq!(p.len(), 3);
source

pub fn is_empty(&self) -> bool

Returns true if the point contains no elements.

Example
let p = Point2::new(1.0, 2.0);
assert!(!p.is_empty());
source

pub fn stride(&self) -> usize

👎Deprecated: This methods is no longer significant and will always return 1.

The stride of this point. This is the number of buffer element separating each component of this point.

source

pub fn iter( &self ) -> MatrixIter<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>

Iterates through this point coordinates.

Example
let p = Point3::new(1.0, 2.0, 3.0);
let mut it = p.iter().cloned();

assert_eq!(it.next(), Some(1.0));
assert_eq!(it.next(), Some(2.0));
assert_eq!(it.next(), Some(3.0));
assert_eq!(it.next(), None);
source

pub unsafe fn get_unchecked(&self, i: usize) -> &T

Gets a reference to i-th element of this point without bound-checking.

source

pub fn iter_mut( &mut self ) -> MatrixIterMut<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>

Mutably iterates through this point coordinates.

Example
let mut p = Point3::new(1.0, 2.0, 3.0);

for e in p.iter_mut() {
    *e *= 10.0;
}

assert_eq!(p, Point3::new(10.0, 20.0, 30.0));
source

pub unsafe fn get_unchecked_mut(&mut self, i: usize) -> &mut T

Gets a mutable reference to i-th element of this point without bound-checking.

source

pub unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)

Swaps two entries without bound-checking.

source

pub fn inf(&self, other: &OPoint<T, D>) -> OPoint<T, D>

Computes the infimum (aka. componentwise min) of two points.

source

pub fn sup(&self, other: &OPoint<T, D>) -> OPoint<T, D>

Computes the supremum (aka. componentwise max) of two points.

source

pub fn inf_sup(&self, other: &OPoint<T, D>) -> (OPoint<T, D>, OPoint<T, D>)

Computes the (infimum, supremum) of two points.

source

pub fn xx(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

Builds a new point from components of self.

source

pub fn xxx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UTerm, Output = Greater>,

Builds a new point from components of self.

source

pub fn xy(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yx(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yy(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xxy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xyx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xyy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yxx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yxy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yyx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yyy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UTerm, B1>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xz(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yz(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zx(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zy(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zz(&self) -> OPoint<T, Const<2>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xxz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xyz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xzx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xzy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn xzz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yxz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yyz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yzx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yzy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn yzz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zxx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zxy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zxz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zyx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zyy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zyz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zzx(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zzy(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

source

pub fn zzz(&self) -> OPoint<T, Const<3>>where <Const<D> as ToTypenum>::Typenum: Cmp<UInt<UInt<UTerm, B1>, B0>, Output = Greater>,

Builds a new point from components of self.

Trait Implementations§

source§

impl<T, D> AbsDiffEq<OPoint<T, D>> for OPoint<T, D>where T: Scalar + AbsDiffEq<T>, D: DimName, <T as AbsDiffEq<T>>::Epsilon: Clone, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Epsilon = <T as AbsDiffEq<T>>::Epsilon

Used for specifying relative comparisons.
source§

fn default_epsilon() -> <OPoint<T, D> as AbsDiffEq<OPoint<T, D>>>::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_eq( &self, other: &OPoint<T, D>, epsilon: <OPoint<T, D> as AbsDiffEq<OPoint<T, D>>>::Epsilon ) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of [AbsDiffEq::abs_diff_eq].
source§

impl<'b, T, D1, D2, SB> Add<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where T: Scalar + ClosedAdd<T>, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2, Const<1>>, DefaultAllocator: Allocator<T, D1, Const<1>>,

§

type Output = OPoint<T, D1>

The resulting type after applying the + operator.
source§

fn add( self, right: &'b Matrix<T, D2, Const<1>, SB> ) -> <OPoint<T, D1> as Add<&'b Matrix<T, D2, Const<1>, SB>>>::Output

Performs the + operation. Read more
source§

impl<T, D1, D2, SB> Add<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where T: Scalar + ClosedAdd<T>, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2, Const<1>>, DefaultAllocator: Allocator<T, D1, Const<1>>,

§

type Output = OPoint<T, D1>

The resulting type after applying the + operator.
source§

fn add( self, right: Matrix<T, D2, Const<1>, SB> ) -> <OPoint<T, D1> as Add<Matrix<T, D2, Const<1>, SB>>>::Output

Performs the + operation. Read more
source§

impl<'b, T, D1, D2, SB> AddAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where D1: DimName, D2: Dim, T: Scalar + ClosedAdd<T>, SB: Storage<T, D2, Const<1>>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1, Const<1>>,

source§

fn add_assign(&mut self, right: &'b Matrix<T, D2, Const<1>, SB>)

Performs the += operation. Read more
source§

impl<T, D1, D2, SB> AddAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where D1: DimName, D2: Dim, T: Scalar + ClosedAdd<T>, SB: Storage<T, D2, Const<1>>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1, Const<1>>,

source§

fn add_assign(&mut self, right: Matrix<T, D2, Const<1>, SB>)

Performs the += operation. Read more
source§

impl<N> AsBytes for OPoint<N, Const<3>>where N: RealField + Copy,

source§

fn as_bytes<'a>(&'a self) -> &'a [u8]

source§

impl<T, D> Bounded for OPoint<T, D>where T: Scalar + Bounded, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn max_value() -> OPoint<T, D>

Returns the largest finite number this type can represent
source§

fn min_value() -> OPoint<T, D>

Returns the smallest finite number this type can represent
source§

impl<T, D> Clone for OPoint<T, D>where T: Clone + Scalar, D: Clone + DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn clone(&self) -> OPoint<T, D>

Returns a copy 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, D> Debug for OPoint<T, D>where T: Debug + Scalar, D: Debug + DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

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

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

impl<T> Deref for OPoint<T, Const<nalgebra::::base::dimension::U2::{constant#0}>>where T: Scalar,

§

type Target = XY<T>

The resulting type after dereferencing.
source§

fn deref( &self ) -> &<OPoint<T, Const<nalgebra::::base::dimension::U2::{constant#0}>> as Deref>::Target

Dereferences the value.
source§

impl<T> Deref for OPoint<T, Const<nalgebra::::base::dimension::U3::{constant#0}>>where T: Scalar,

§

type Target = XYZ<T>

The resulting type after dereferencing.
source§

fn deref( &self ) -> &<OPoint<T, Const<nalgebra::::base::dimension::U3::{constant#0}>> as Deref>::Target

Dereferences the value.
source§

impl<T> Deref for OPoint<T, Const<nalgebra::::base::dimension::U4::{constant#0}>>where T: Scalar,

§

type Target = XYZW<T>

The resulting type after dereferencing.
source§

fn deref( &self ) -> &<OPoint<T, Const<nalgebra::::base::dimension::U4::{constant#0}>> as Deref>::Target

Dereferences the value.
source§

impl<T> Deref for OPoint<T, Const<nalgebra::::base::dimension::U5::{constant#0}>>where T: Scalar,

§

type Target = XYZWA<T>

The resulting type after dereferencing.
source§

fn deref( &self ) -> &<OPoint<T, Const<nalgebra::::base::dimension::U5::{constant#0}>> as Deref>::Target

Dereferences the value.
source§

impl<T> Deref for OPoint<T, Const<nalgebra::::base::dimension::U6::{constant#0}>>where T: Scalar,

§

type Target = XYZWAB<T>

The resulting type after dereferencing.
source§

fn deref( &self ) -> &<OPoint<T, Const<nalgebra::::base::dimension::U6::{constant#0}>> as Deref>::Target

Dereferences the value.
source§

impl<T> DerefMut for OPoint<T, Const<nalgebra::::base::dimension::U2::{constant#0}>>where T: Scalar,

source§

fn deref_mut( &mut self ) -> &mut <OPoint<T, Const<nalgebra::::base::dimension::U2::{constant#0}>> as Deref>::Target

Mutably dereferences the value.
source§

impl<T> DerefMut for OPoint<T, Const<nalgebra::::base::dimension::U3::{constant#0}>>where T: Scalar,

source§

fn deref_mut( &mut self ) -> &mut <OPoint<T, Const<nalgebra::::base::dimension::U3::{constant#0}>> as Deref>::Target

Mutably dereferences the value.
source§

impl<T> DerefMut for OPoint<T, Const<nalgebra::::base::dimension::U4::{constant#0}>>where T: Scalar,

source§

fn deref_mut( &mut self ) -> &mut <OPoint<T, Const<nalgebra::::base::dimension::U4::{constant#0}>> as Deref>::Target

Mutably dereferences the value.
source§

impl<T> DerefMut for OPoint<T, Const<nalgebra::::base::dimension::U5::{constant#0}>>where T: Scalar,

source§

fn deref_mut( &mut self ) -> &mut <OPoint<T, Const<nalgebra::::base::dimension::U5::{constant#0}>> as Deref>::Target

Mutably dereferences the value.
source§

impl<T> DerefMut for OPoint<T, Const<nalgebra::::base::dimension::U6::{constant#0}>>where T: Scalar,

source§

fn deref_mut( &mut self ) -> &mut <OPoint<T, Const<nalgebra::::base::dimension::U6::{constant#0}>> as Deref>::Target

Mutably dereferences the value.
source§

impl<'a, T, D> Deserialize<'a> for OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer: Deserialize<'a>,

source§

fn deserialize<Des>( deserializer: Des ) -> Result<OPoint<T, D>, <Des as Deserializer<'a>>::Error>where Des: Deserializer<'a>,

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

impl<T, D> Display for OPoint<T, D>where T: Scalar + Display, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

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

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

impl<T, D> Div<T> for OPoint<T, D>where T: Scalar + ClosedDiv<T>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Output = OPoint<T, D>

The resulting type after applying the / operator.
source§

fn div(self, right: T) -> <OPoint<T, D> as Div<T>>::Output

Performs the / operation. Read more
source§

impl<T, D> DivAssign<T> for OPoint<T, D>where T: Scalar + ClosedDiv<T>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn div_assign(&mut self, right: T)

Performs the /= operation. Read more
source§

impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 16]> for OPoint<T, Const<D>>where T: Scalar + Copy + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 16]>, <T as SimdValue>::Element: Scalar + Copy, <DefaultAllocator as Allocator<<T as SimdValue>::Element, Const<D>, Const<1>>>::Buffer: Copy,

source§

fn from( arr: [OPoint<<T as SimdValue>::Element, Const<D>>; 16] ) -> OPoint<T, Const<D>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 2]> for OPoint<T, Const<D>>where T: Scalar + Copy + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 2]>, <T as SimdValue>::Element: Scalar + Copy, <DefaultAllocator as Allocator<<T as SimdValue>::Element, Const<D>, Const<1>>>::Buffer: Copy,

source§

fn from( arr: [OPoint<<T as SimdValue>::Element, Const<D>>; 2] ) -> OPoint<T, Const<D>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 4]> for OPoint<T, Const<D>>where T: Scalar + Copy + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 4]>, <T as SimdValue>::Element: Scalar + Copy, <DefaultAllocator as Allocator<<T as SimdValue>::Element, Const<D>, Const<1>>>::Buffer: Copy,

source§

fn from( arr: [OPoint<<T as SimdValue>::Element, Const<D>>; 4] ) -> OPoint<T, Const<D>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<[OPoint<<T as SimdValue>::Element, Const<D>>; 8]> for OPoint<T, Const<D>>where T: Scalar + Copy + PrimitiveSimdValue + From<[<T as SimdValue>::Element; 8]>, <T as SimdValue>::Element: Scalar + Copy, <DefaultAllocator as Allocator<<T as SimdValue>::Element, Const<D>, Const<1>>>::Buffer: Copy,

source§

fn from( arr: [OPoint<<T as SimdValue>::Element, Const<D>>; 8] ) -> OPoint<T, Const<D>>

Converts to this type from the input type.
source§

impl<T, const D: usize> From<[T; D]> for OPoint<T, Const<D>>where T: Scalar,

source§

fn from(coords: [T; D]) -> OPoint<T, Const<D>>

Converts to this type from the input type.
source§

impl<T, D> From<Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>> for OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn from( coords: Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer> ) -> OPoint<T, D>

Converts to this type from the input type.
source§

impl<T, D> Hash for OPoint<T, D>where T: Scalar + Hash, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

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<T, D> Index<usize> for OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Output = T

The returned type after indexing.
source§

fn index(&self, i: usize) -> &<OPoint<T, D> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T, D> IndexMut<usize> for OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn index_mut(&mut self, i: usize) -> &mut <OPoint<T, D> as Index<usize>>::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<T, D> Mul<T> for OPoint<T, D>where T: Scalar + ClosedMul<T>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Output = OPoint<T, D>

The resulting type after applying the * operator.
source§

fn mul(self, right: T) -> <OPoint<T, D> as Mul<T>>::Output

Performs the * operation. Read more
source§

impl<T, D> MulAssign<T> for OPoint<T, D>where T: Scalar + ClosedMul<T>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn mul_assign(&mut self, right: T)

Performs the *= operation. Read more
source§

impl<T, D> Neg for OPoint<T, D>where T: Scalar + ClosedNeg, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Output = OPoint<T, D>

The resulting type after applying the - operator.
source§

fn neg(self) -> <OPoint<T, D> as Neg>::Output

Performs the unary - operation. Read more
source§

impl<T, D> PartialEq<OPoint<T, D>> for OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn eq(&self, right: &OPoint<T, D>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, D> PartialOrd<OPoint<T, D>> for OPoint<T, D>where T: Scalar + PartialOrd<T>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn partial_cmp(&self, other: &OPoint<T, D>) -> Option<Ordering>

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

fn lt(&self, right: &OPoint<T, D>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, right: &OPoint<T, D>) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
source§

fn gt(&self, right: &OPoint<T, D>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
source§

fn ge(&self, right: &OPoint<T, D>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T, D> RelativeEq<OPoint<T, D>> for OPoint<T, D>where T: Scalar + RelativeEq<T>, D: DimName, <T as AbsDiffEq<T>>::Epsilon: Clone, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn default_max_relative() -> <OPoint<T, D> as AbsDiffEq<OPoint<T, D>>>::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &OPoint<T, D>, epsilon: <OPoint<T, D> as AbsDiffEq<OPoint<T, D>>>::Epsilon, max_relative: <OPoint<T, D> as AbsDiffEq<OPoint<T, D>>>::Epsilon ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool

The inverse of [RelativeEq::relative_eq].
source§

impl<T, D> Serialize for OPoint<T, D>where T: Scalar, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer: 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<T, const D: usize> SimdValue for OPoint<T, Const<D>>where T: Scalar + SimdValue, <T as SimdValue>::Element: Scalar,

§

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 of the result of comparing two SIMD values like self.
source§

fn lanes() -> usize

The number of lanes of this SIMD value.
source§

fn splat( val: <OPoint<T, Const<D>> as SimdValue>::Element ) -> OPoint<T, Const<D>>

Initializes an SIMD value with each lanes set to val.
source§

fn extract(&self, i: usize) -> <OPoint<T, Const<D>> as SimdValue>::Element

Extracts the i-th lane of self. Read more
source§

unsafe fn extract_unchecked( &self, i: usize ) -> <OPoint<T, Const<D>> as SimdValue>::Element

Extracts the i-th lane of self without bound-checking.
source§

fn replace( &mut self, i: usize, val: <OPoint<T, Const<D>> as SimdValue>::Element )

Replaces the i-th lane of self by val. Read more
source§

unsafe fn replace_unchecked( &mut self, i: usize, val: <OPoint<T, Const<D>> as SimdValue>::Element )

Replaces the i-th lane of self by val without bound-checking.
source§

fn select( self, cond: <OPoint<T, Const<D>> as SimdValue>::SimdBool, other: OPoint<T, Const<D>> ) -> OPoint<T, Const<D>>

Merges self and other depending on the lanes of cond. Read more
§

fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Selfwhere Self: Clone,

Applies a function to each lane of self. Read more
§

fn zip_map_lanes( self, b: Self, f: impl Fn(Self::Element, Self::Element) -> Self::Element ) -> Selfwhere Self: Clone,

Applies a function to each lane of self paired with the corresponding lane of b. Read more
source§

impl<'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where T: Scalar + ClosedSub<T>, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2, Const<1>>, DefaultAllocator: Allocator<T, D1, Const<1>>,

§

type Output = OPoint<T, D1>

The resulting type after applying the - operator.
source§

fn sub( self, right: &'b Matrix<T, D2, Const<1>, SB> ) -> <OPoint<T, D1> as Sub<&'b Matrix<T, D2, Const<1>, SB>>>::Output

Performs the - operation. Read more
source§

impl<'b, T, D> Sub<&'b OPoint<T, D>> for OPoint<T, D>where T: Scalar + ClosedSub<T>, ShapeConstraint: SameNumberOfRows<D, D, Representative = D> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Output = Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>

The resulting type after applying the - operator.
source§

fn sub( self, right: &'b OPoint<T, D> ) -> <OPoint<T, D> as Sub<&'b OPoint<T, D>>>::Output

Performs the - operation. Read more
source§

impl<T, D1, D2, SB> Sub<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where T: Scalar + ClosedSub<T>, ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D1: DimName, D2: Dim, SB: Storage<T, D2, Const<1>>, DefaultAllocator: Allocator<T, D1, Const<1>>,

§

type Output = OPoint<T, D1>

The resulting type after applying the - operator.
source§

fn sub( self, right: Matrix<T, D2, Const<1>, SB> ) -> <OPoint<T, D1> as Sub<Matrix<T, D2, Const<1>, SB>>>::Output

Performs the - operation. Read more
source§

impl<T, D> Sub<OPoint<T, D>> for OPoint<T, D>where T: Scalar + ClosedSub<T>, ShapeConstraint: SameNumberOfRows<D, D, Representative = D> + SameNumberOfColumns<Const<1>, Const<1>, Representative = Const<1>>, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,

§

type Output = Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>

The resulting type after applying the - operator.
source§

fn sub(self, right: OPoint<T, D>) -> <OPoint<T, D> as Sub<OPoint<T, D>>>::Output

Performs the - operation. Read more
source§

impl<'b, T, D1, D2, SB> SubAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where D1: DimName, D2: Dim, T: Scalar + ClosedSub<T>, SB: Storage<T, D2, Const<1>>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1, Const<1>>,

source§

fn sub_assign(&mut self, right: &'b Matrix<T, D2, Const<1>, SB>)

Performs the -= operation. Read more
source§

impl<T, D1, D2, SB> SubAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where D1: DimName, D2: Dim, T: Scalar + ClosedSub<T>, SB: Storage<T, D2, Const<1>>, ShapeConstraint: SameNumberOfRows<D1, D2>, DefaultAllocator: Allocator<T, D1, Const<1>>,

source§

fn sub_assign(&mut self, right: Matrix<T, D2, Const<1>, SB>)

Performs the -= operation. Read more
source§

impl<T1, T2, D> SubsetOf<Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer>> for OPoint<T1, D>where D: DimNameAdd<Const<1>>, T1: Scalar, T2: Scalar + Zero + One + ClosedDiv<T2> + SupersetOf<T1>, DefaultAllocator: Allocator<T1, D, Const<1>> + Allocator<T2, D, Const<1>> + Allocator<T1, <D as DimNameAdd<Const<1>>>::Output, Const<1>> + Allocator<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>>,

source§

fn to_superset( &self ) -> Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer>

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

fn is_in_subset( v: &Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer> ) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked( v: &Matrix<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1>>>::Output, Const<1>>>::Buffer> ) -> OPoint<T1, D>

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

fn from_superset(element: &T) -> Option<Self>

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

impl<T1, T2, D> SubsetOf<OPoint<T2, D>> for OPoint<T1, D>where D: DimName, T1: Scalar, T2: Scalar + SupersetOf<T1>, DefaultAllocator: Allocator<T1, D, Const<1>> + Allocator<T2, D, Const<1>>,

source§

fn to_superset(&self) -> OPoint<T2, D>

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

fn is_in_subset(m: &OPoint<T2, D>) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).
source§

fn from_superset_unchecked(m: &OPoint<T2, D>) -> OPoint<T1, D>

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

fn from_superset(element: &T) -> Option<Self>

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

impl<T, D> UlpsEq<OPoint<T, D>> for OPoint<T, D>where T: Scalar + UlpsEq<T>, D: DimName, <T as AbsDiffEq<T>>::Epsilon: Clone, DefaultAllocator: Allocator<T, D, Const<1>>,

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq( &self, other: &OPoint<T, D>, epsilon: <OPoint<T, D> as AbsDiffEq<OPoint<T, D>>>::Epsilon, max_ulps: u32 ) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of [UlpsEq::ulps_eq].
source§

impl<T, D> Copy for OPoint<T, D>where T: Scalar + Copy, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>, Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D, Const<1>>>::Buffer>: Copy,

source§

impl<T, D> Eq for OPoint<T, D>where T: Scalar + Eq, D: DimName, DefaultAllocator: Allocator<T, D, Const<1>>,