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
Source§impl<T: Scalar, D: DimName> OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar, D: DimName> OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Sourcepub fn map<T2: Scalar, F: FnMut(T) -> T2>(&self, f: F) -> OPoint<T2, D>where
DefaultAllocator: Allocator<T2, D>,
pub fn map<T2: Scalar, F: FnMut(T) -> T2>(&self, f: F) -> OPoint<T2, D>where
DefaultAllocator: Allocator<T2, D>,
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));
Sourcepub fn apply<F: FnMut(&mut T)>(&mut self, f: F)
pub fn apply<F: FnMut(&mut T)>(&mut self, f: F)
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));
Sourcepub fn to_homogeneous(&self) -> OVector<T, DimNameSum<D, U1>>
pub fn to_homogeneous(&self) -> OVector<T, DimNameSum<D, U1>>
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));
Sourcepub fn from_coordinates(coords: OVector<T, D>) -> Self
👎Deprecated: Use Point::from(vector) instead.
pub fn from_coordinates(coords: OVector<T, D>) -> Self
Creates a new point with the given coordinates.
Sourcepub fn len(&self) -> usize
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);
Sourcepub fn is_empty(&self) -> bool
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());
Sourcepub fn stride(&self) -> usize
👎Deprecated: This methods is no longer significant and will always return 1.
pub fn stride(&self) -> usize
The stride of this point. This is the number of buffer element separating each component of this point.
Sourcepub fn iter(
&self,
) -> MatrixIter<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer> ⓘ
pub fn iter( &self, ) -> MatrixIter<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::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);
Sourcepub unsafe fn get_unchecked(&self, i: usize) -> &T
pub unsafe fn get_unchecked(&self, i: usize) -> &T
Gets a reference to i-th element of this point without bound-checking.
Sourcepub fn iter_mut(
&mut self,
) -> MatrixIterMut<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer> ⓘ
pub fn iter_mut( &mut self, ) -> MatrixIterMut<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::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));
Sourcepub unsafe fn get_unchecked_mut(&mut self, i: usize) -> &mut T
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.
Sourcepub unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)
pub unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)
Swaps two entries without bound-checking.
Source§impl<T: Scalar + SimdPartialOrd, D: DimName> OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + SimdPartialOrd, D: DimName> OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar, D: DimName> OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar, D: DimName> OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
§Other construction methods
Sourcepub fn origin() -> Selfwhere
T: Zero,
pub fn origin() -> Selfwhere
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);
Sourcepub fn from_slice(components: &[T]) -> Self
pub fn from_slice(components: &[T]) -> Self
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));
Sourcepub fn from_homogeneous(v: OVector<T, DimNameSum<D, U1>>) -> Option<Self>where
T: Scalar + Zero + One + ClosedDiv,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<T, DimNameSum<D, U1>>,
pub fn from_homogeneous(v: OVector<T, DimNameSum<D, U1>>) -> Option<Self>where
T: Scalar + Zero + One + ClosedDiv,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<T, DimNameSum<D, U1>>,
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)));
Trait Implementations§
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: Scalar + SimdValue, const D: usize> SimdValue for Point<T, D>
impl<T: Scalar + SimdValue, const D: usize> SimdValue for Point<T, D>
Source§type Element = OPoint<<T as SimdValue>::Element, Const<D>>
type Element = OPoint<<T as SimdValue>::Element, Const<D>>
Source§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.Source§impl<T: Scalar + AbsDiffEq, D: DimName> AbsDiffEq for OPoint<T, D>
impl<T: Scalar + AbsDiffEq, D: DimName> AbsDiffEq for OPoint<T, D>
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
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,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<'b, T, D1, D2, SB> Add<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§impl<T, D1, D2, SB> Add<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<T, D1, D2, SB> Add<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§impl<'b, T, D1: DimName, D2: Dim, SB> AddAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<'b, T, D1: DimName, D2: Dim, SB> AddAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§fn add_assign(&mut self, right: &'b Vector<T, D2, SB>)
fn add_assign(&mut self, right: &'b Vector<T, D2, SB>)
+=
operation. Read moreSource§impl<T, D1: DimName, D2: Dim, SB> AddAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<T, D1: DimName, D2: Dim, SB> AddAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedAdd,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§fn add_assign(&mut self, right: Vector<T, D2, SB>)
fn add_assign(&mut self, right: Vector<T, D2, SB>)
+=
operation. Read moreSource§impl<T: Scalar + Bounded, D: DimName> Bounded for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + Bounded, D: DimName> Bounded for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Clone + Scalar, D: Clone + DimName> Clone for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Clone + Scalar, D: Clone + DimName> Clone for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + Debug, D: DimName> Debug for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + Debug, D: DimName> Debug for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + Zero, D: DimName> Default for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + Zero, D: DimName> Default for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<'a, T: Scalar, D: DimName> Deserialize<'a> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
<DefaultAllocator as Allocator<T, D>>::Buffer: Deserialize<'a>,
impl<'a, T: Scalar, D: DimName> Deserialize<'a> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
<DefaultAllocator as Allocator<T, D>>::Buffer: Deserialize<'a>,
Source§fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error>where
Des: Deserializer<'a>,
fn deserialize<Des>(deserializer: Des) -> Result<Self, Des::Error>where
Des: Deserializer<'a>,
Source§impl<T: Scalar + Display, D: DimName> Display for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + Display, D: DimName> Display for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + ClosedDiv, D: DimName> Div<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + ClosedDiv, D: DimName> Div<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + ClosedDiv, D: DimName> DivAssign<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + ClosedDiv, D: DimName> DivAssign<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§fn div_assign(&mut self, right: T)
fn div_assign(&mut self, right: T)
/=
operation. Read moreSource§impl<T: Scalar, D: DimName> From<Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar, D: DimName> From<Matrix<T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + Hash, D: DimName> Hash for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + Hash, D: DimName> Hash for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar, D: DimName> Index<usize> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar, D: DimName> Index<usize> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar, D: DimName> IndexMut<usize> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar, D: DimName> IndexMut<usize> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + ClosedMul, D: DimName> Mul<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + ClosedMul, D: DimName> Mul<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + ClosedMul, D: DimName> MulAssign<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + ClosedMul, D: DimName> MulAssign<T> for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§fn mul_assign(&mut self, right: T)
fn mul_assign(&mut self, right: T)
*=
operation. Read moreSource§impl<T: Scalar + ClosedNeg, D: DimName> Neg for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + ClosedNeg, D: DimName> Neg for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar, D: DimName> PartialEq for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar, D: DimName> PartialEq for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + PartialOrd, D: DimName> PartialOrd for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + PartialOrd, D: DimName> PartialOrd for OPoint<T, D>where
DefaultAllocator: Allocator<T, D>,
Source§impl<T: Scalar + RelativeEq, D: DimName> RelativeEq for OPoint<T, D>
impl<T: Scalar + RelativeEq, D: DimName> RelativeEq for OPoint<T, D>
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq
.Source§impl<'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§impl<'b, T, D> Sub<&'b OPoint<T, D>> for OPoint<T, D>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D, D, Representative = D> + SameNumberOfColumns<U1, U1, Representative = U1>,
D: DimName,
DefaultAllocator: Allocator<T, D>,
impl<'b, T, D> Sub<&'b OPoint<T, D>> for OPoint<T, D>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D, D, Representative = D> + SameNumberOfColumns<U1, U1, Representative = U1>,
D: DimName,
DefaultAllocator: Allocator<T, D>,
Source§impl<T, D1, D2, SB> Sub<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<T, D1, D2, SB> Sub<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1, Representative = U1>,
D1: DimName,
D2: Dim,
SB: Storage<T, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§impl<T, D> Sub for OPoint<T, D>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D, D, Representative = D> + SameNumberOfColumns<U1, U1, Representative = U1>,
D: DimName,
DefaultAllocator: Allocator<T, D>,
impl<T, D> Sub for OPoint<T, D>where
T: Scalar + ClosedSub,
ShapeConstraint: SameNumberOfRows<D, D, Representative = D> + SameNumberOfColumns<U1, U1, Representative = U1>,
D: DimName,
DefaultAllocator: Allocator<T, D>,
Source§impl<'b, T, D1: DimName, D2: Dim, SB> SubAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<'b, T, D1: DimName, D2: Dim, SB> SubAssign<&'b Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§fn sub_assign(&mut self, right: &'b Vector<T, D2, SB>)
fn sub_assign(&mut self, right: &'b Vector<T, D2, SB>)
-=
operation. Read moreSource§impl<T, D1: DimName, D2: Dim, SB> SubAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
impl<T, D1: DimName, D2: Dim, SB> SubAssign<Matrix<T, D2, Const<1>, SB>> for OPoint<T, D1>where
T: Scalar + ClosedSub,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Source§fn sub_assign(&mut self, right: Vector<T, D2, SB>)
fn sub_assign(&mut self, right: Vector<T, D2, SB>)
-=
operation. Read moreSource§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>>::Buffer>> for OPoint<T1, D>where
D: DimNameAdd<U1>,
T1: Scalar,
T2: Scalar + Zero + One + ClosedDiv + SupersetOf<T1>,
DefaultAllocator: Allocator<T1, D> + Allocator<T2, D> + Allocator<T1, DimNameSum<D, U1>> + Allocator<T2, DimNameSum<D, U1>>,
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>>::Buffer>> for OPoint<T1, D>where
D: DimNameAdd<U1>,
T1: Scalar,
T2: Scalar + Zero + One + ClosedDiv + SupersetOf<T1>,
DefaultAllocator: Allocator<T1, D> + Allocator<T2, D> + Allocator<T1, DimNameSum<D, U1>> + Allocator<T2, DimNameSum<D, U1>>,
Source§fn to_superset(&self) -> OVector<T2, DimNameSum<D, U1>>
fn to_superset(&self) -> OVector<T2, DimNameSum<D, U1>>
self
to the equivalent element of its superset.Source§fn is_in_subset(v: &OVector<T2, DimNameSum<D, U1>>) -> bool
fn is_in_subset(v: &OVector<T2, DimNameSum<D, U1>>) -> bool
element
is actually part of the subset Self
(and can be converted to it).Source§fn from_superset_unchecked(v: &OVector<T2, DimNameSum<D, U1>>) -> Self
fn from_superset_unchecked(v: &OVector<T2, DimNameSum<D, U1>>) -> Self
self.to_superset
but without any property checks. Always succeeds.Source§impl<T1, T2, D: DimName> SubsetOf<OPoint<T2, D>> for OPoint<T1, D>where
T1: Scalar,
T2: Scalar + SupersetOf<T1>,
DefaultAllocator: Allocator<T1, D> + Allocator<T2, D>,
impl<T1, T2, D: DimName> SubsetOf<OPoint<T2, D>> for OPoint<T1, D>where
T1: Scalar,
T2: Scalar + SupersetOf<T1>,
DefaultAllocator: Allocator<T1, D> + Allocator<T2, D>,
Source§fn to_superset(&self) -> OPoint<T2, D>
fn to_superset(&self) -> OPoint<T2, D>
self
to the equivalent element of its superset.Source§fn is_in_subset(m: &OPoint<T2, D>) -> bool
fn is_in_subset(m: &OPoint<T2, D>) -> bool
element
is actually part of the subset Self
(and can be converted to it).Source§fn from_superset_unchecked(m: &OPoint<T2, D>) -> Self
fn from_superset_unchecked(m: &OPoint<T2, D>) -> Self
self.to_superset
but without any property checks. Always succeeds.