Struct nalgebra::geometry::OPoint [−][src]
#[repr(C)]pub struct OPoint<T: Scalar, D: DimName> where
DefaultAllocator: Allocator<T, D>, {
pub coords: OVector<T, D>,
}
Expand description
A point in an euclidean space.
The difference between a point and a vector is only semantic. See the user guide
for details on the distinction. The most notable difference that vectors ignore translations.
In particular, an Isometry2
or Isometry3
will
transform points by applying a rotation and a translation on them. However, these isometries
will only apply rotations to vectors (when doing isometry * vector
, the translation part of
the isometry is ignored).
Construction
- From individual components
new
… - Swizzling
xx
,yxz
… - Other construction methods
origin
,from_slice
,from_homogeneous
…
Transformation
Transforming a point by an Isometry, rotation, etc. can be
achieved by multiplication, e.g., isometry * point
or rotation * point
. Some of these transformation
may have some other methods, e.g., isometry.inverse_transform_point(&point)
. See the documentation
of said transformations for details.
Fields
coords: OVector<T, D>
The coordinates of this point, i.e., the shift from the origin.
Implementations
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));
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));
pub fn to_homogeneous(&self) -> OVector<T, DimNameSum<D, U1>> where
T: One,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<T, DimNameSum<D, U1>>,
pub fn to_homogeneous(&self) -> OVector<T, DimNameSum<D, U1>> where
T: One,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<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));
👎 Deprecated: Use Point::from(vector) instead.
Use Point::from(vector) instead.
Creates a new point with the given coordinates.
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);
Returns true if the point contains no elements.
Example
let p = Point2::new(1.0, 2.0);
assert!(!p.is_empty());
👎 Deprecated: This methods is no longer significant and will always return 1.
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.
pub fn iter(
&self
) -> MatrixIter<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>ⓘNotable traits for MatrixIter<'a, T, R, C, S>impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage<T, R, C>> Iterator for MatrixIter<'a, T, R, C, S> type Item = &'a T;
pub fn iter(
&self
) -> MatrixIter<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>ⓘNotable traits for MatrixIter<'a, T, R, C, S>impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage<T, R, C>> Iterator for MatrixIter<'a, T, R, C, S> type Item = &'a T;
impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage<T, R, C>> Iterator for MatrixIter<'a, T, R, C, S> type Item = &'a T;
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);
Gets a reference to i-th element of this point without bound-checking.
pub fn iter_mut(
&mut self
) -> MatrixIterMut<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>ⓘNotable traits for MatrixIterMut<'a, T, R, C, S>impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut<T, R, C>> Iterator for MatrixIterMut<'a, T, R, C, S> type Item = &'a mut T;
pub fn iter_mut(
&mut self
) -> MatrixIterMut<'_, T, D, Const<1>, <DefaultAllocator as Allocator<T, D>>::Buffer>ⓘNotable traits for MatrixIterMut<'a, T, R, C, S>impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut<T, R, C>> Iterator for MatrixIterMut<'a, T, R, C, S> type Item = &'a mut T;
impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut<T, R, C>> Iterator for MatrixIterMut<'a, T, R, C, S> type Item = &'a mut T;
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));
Gets a mutable reference to i-th element of this point without bound-checking.
Swaps two entries without bound-checking.
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>,
Computes the infimum (aka. componentwise min) of two points.
Computes the supremum (aka. componentwise max) of two points.
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);
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));
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>>,
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)));
pub fn cast<To: Scalar>(self) -> OPoint<To, D> where
OPoint<To, D>: SupersetOf<Self>,
DefaultAllocator: Allocator<To, D>,
pub fn cast<To: Scalar>(self) -> OPoint<To, D> where
OPoint<To, D>: SupersetOf<Self>,
DefaultAllocator: Allocator<To, D>,
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));
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Builds a new point from components of self
.
Trait Implementations
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
The inverse of AbsDiffEq::abs_diff_eq
.
impl<'a, 'b, T, D1, D2, SB> Add<&'b Matrix<T, D2, Const<1_usize>, SB>> for &'a 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<'a, 'b, T, D1, D2, SB> Add<&'b Matrix<T, D2, Const<1_usize>, SB>> for &'a 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_usize>, 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_usize>, 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<'a, T, D1, D2, SB> Add<Matrix<T, D2, Const<1_usize>, SB>> for &'a 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<'a, T, D1, D2, SB> Add<Matrix<T, D2, Const<1_usize>, SB>> for &'a 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_usize>, 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_usize>, 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: DimName, D2: Dim, SB> AddAssign<&'b Matrix<T, D2, Const<1_usize>, 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_usize>, SB>> for OPoint<T, D1> where
T: Scalar + ClosedAdd,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Performs the +=
operation. Read more
impl<T, D1: DimName, D2: Dim, SB> AddAssign<Matrix<T, D2, Const<1_usize>, 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_usize>, SB>> for OPoint<T, D1> where
T: Scalar + ClosedAdd,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Performs the +=
operation. Read more
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>,
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>,
Deserialize this value from the given Serde deserializer. Read more
Performs the /=
operation. Read more
impl<T: SimdRealField, R, const D: usize> From<OPoint<T, Const<D>>> for Isometry<T, R, D> where
R: AbstractRotation<T, D>,
impl<T: SimdRealField, R, const D: usize> From<OPoint<T, Const<D>>> for Isometry<T, R, D> where
R: AbstractRotation<T, D>,
impl<T: Scalar + Zero + One, D: DimName> From<OPoint<T, D>> for OVector<T, DimNameSum<D, U1>> where
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<T, DimNameSum<D, U1>> + Allocator<T, D>,
impl<T: Scalar + Zero + One, D: DimName> From<OPoint<T, D>> for OVector<T, DimNameSum<D, U1>> where
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<T, DimNameSum<D, U1>> + Allocator<T, D>,
impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<2_usize>>> for UnitComplex<T> where
T::Element: SimdRealField,
impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<2_usize>>> for UnitComplex<T> where
T::Element: SimdRealField,
impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<2_usize>>> for &'a UnitComplex<T> where
T::Element: SimdRealField,
impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<2_usize>>> for &'a UnitComplex<T> where
T::Element: SimdRealField,
impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for &'a UnitQuaternion<T> where
T::Element: SimdRealField,
impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for &'a UnitQuaternion<T> where
T::Element: SimdRealField,
impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for UnitQuaternion<T> where
T::Element: SimdRealField,
impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for UnitQuaternion<T> where
T::Element: SimdRealField,
impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for &'a UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<'a, 'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for &'a UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<'b, T: SimdRealField> Mul<&'b OPoint<T, Const<3_usize>>> for UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<'a, 'b, T, const D: usize> Mul<&'b OPoint<T, Const<D>>> for &'a Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<'a, 'b, T, const D: usize> Mul<&'b OPoint<T, Const<D>>> for &'a Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<'b, T, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<'b, T, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, 'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for &'a Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, 'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for &'a Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, 'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for &'a Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, 'b, T: SimdRealField, R, const D: usize> Mul<&'b OPoint<T, Const<D>>> for &'a Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, 'b, T, SA, const D2: usize, const R1: usize, const C1: usize> Mul<&'b OPoint<T, Const<D2>>> for &'a Matrix<T, Const<R1>, Const<C1>, SA> where
T: Scalar + Zero + One + ClosedAdd + ClosedMul,
SA: Storage<T, Const<R1>, Const<C1>>,
ShapeConstraint: AreMultipliable<Const<R1>, Const<C1>, Const<D2>, U1>,
impl<'a, 'b, T, SA, const D2: usize, const R1: usize, const C1: usize> Mul<&'b OPoint<T, Const<D2>>> for &'a Matrix<T, Const<R1>, Const<C1>, SA> where
T: Scalar + Zero + One + ClosedAdd + ClosedMul,
SA: Storage<T, Const<R1>, Const<C1>>,
ShapeConstraint: AreMultipliable<Const<R1>, Const<C1>, Const<D2>, U1>,
impl<T: SimdRealField> Mul<OPoint<T, Const<2_usize>>> for UnitComplex<T> where
T::Element: SimdRealField,
impl<T: SimdRealField> Mul<OPoint<T, Const<2_usize>>> for UnitComplex<T> where
T::Element: SimdRealField,
impl<'a, T: SimdRealField> Mul<OPoint<T, Const<2_usize>>> for &'a UnitComplex<T> where
T::Element: SimdRealField,
impl<'a, T: SimdRealField> Mul<OPoint<T, Const<2_usize>>> for &'a UnitComplex<T> where
T::Element: SimdRealField,
impl<'a, T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for &'a UnitQuaternion<T> where
T::Element: SimdRealField,
impl<'a, T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for &'a UnitQuaternion<T> where
T::Element: SimdRealField,
impl<T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for UnitQuaternion<T> where
T::Element: SimdRealField,
impl<T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for UnitQuaternion<T> where
T::Element: SimdRealField,
impl<'a, T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for &'a UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<'a, T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for &'a UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<T: SimdRealField> Mul<OPoint<T, Const<3_usize>>> for UnitDualQuaternion<T> where
T::Element: SimdRealField,
impl<'a, T, const D: usize> Mul<OPoint<T, Const<D>>> for &'a Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<'a, T, const D: usize> Mul<OPoint<T, Const<D>>> for &'a Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<T, const D: usize> Mul<OPoint<T, Const<D>>> for Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<T, const D: usize> Mul<OPoint<T, Const<D>>> for Translation<T, D> where
T: Scalar + ClosedAdd,
ShapeConstraint: SameNumberOfRows<Const<D>, Const<D>, Representative = Const<D>> + SameNumberOfColumns<U1, U1, Representative = U1>,
impl<T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for &'a Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for &'a Isometry<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for &'a Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
impl<'a, T: SimdRealField, R, const D: usize> Mul<OPoint<T, Const<D>>> for &'a Similarity<T, R, D> where
T::Element: SimdRealField,
R: AbstractRotation<T, D>,
Performs the *=
operation. Read more
impl<T: Scalar + PartialOrd, D: DimName> PartialOrd<OPoint<T, D>> for OPoint<T, D> where
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + PartialOrd, D: DimName> PartialOrd<OPoint<T, D>> for OPoint<T, D> where
DefaultAllocator: Allocator<T, D>,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T: Scalar + RelativeEq, D: DimName> RelativeEq<OPoint<T, D>> for OPoint<T, D> where
T::Epsilon: Clone,
DefaultAllocator: Allocator<T, D>,
impl<T: Scalar + RelativeEq, D: DimName> RelativeEq<OPoint<T, D>> for OPoint<T, D> where
T::Epsilon: Clone,
DefaultAllocator: Allocator<T, D>,
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The inverse of RelativeEq::relative_eq
.
impl<'a, 'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1_usize>, SB>> for &'a 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<'a, 'b, T, D1, D2, SB> Sub<&'b Matrix<T, D2, Const<1_usize>, SB>> for &'a 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_usize>, 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_usize>, 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<'a, 'b, T, D> Sub<&'b OPoint<T, D>> for &'a 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<'a, 'b, T, D> Sub<&'b OPoint<T, D>> for &'a 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>,
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<'a, T, D1, D2, SB> Sub<Matrix<T, D2, Const<1_usize>, SB>> for &'a 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<'a, T, D1, D2, SB> Sub<Matrix<T, D2, Const<1_usize>, SB>> for &'a 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_usize>, 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_usize>, 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<'a, T, D> Sub<OPoint<T, D>> for &'a 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<'a, T, D> Sub<OPoint<T, D>> for &'a 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<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<T, D> Sub<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, D1: DimName, D2: Dim, SB> SubAssign<&'b Matrix<T, D2, Const<1_usize>, 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_usize>, SB>> for OPoint<T, D1> where
T: Scalar + ClosedSub,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Performs the -=
operation. Read more
impl<T, D1: DimName, D2: Dim, SB> SubAssign<Matrix<T, D2, Const<1_usize>, 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_usize>, SB>> for OPoint<T, D1> where
T: Scalar + ClosedSub,
SB: Storage<T, D2>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
DefaultAllocator: Allocator<T, D1>,
Performs the -=
operation. Read more
impl<T1, T2, D> SubsetOf<Matrix<T2, <D as DimNameAdd<Const<1_usize>>>::Output, Const<1_usize>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1_usize>>>::Output, Const<1_usize>>>::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_usize>>>::Output, Const<1_usize>, <DefaultAllocator as Allocator<T2, <D as DimNameAdd<Const<1_usize>>>::Output, Const<1_usize>>>::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>>,
The inclusion map: converts self
to the equivalent element of its superset.
Checks if element
is actually part of the subset Self
(and can be converted to it).
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
The inclusion map: converts self
to the equivalent element of its superset.
Checks if element
is actually part of the subset Self
(and can be converted to it).
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
Auto Trait Implementations
impl<T, D> !RefUnwindSafe for OPoint<T, D>
impl<T, D> !UnwindSafe for OPoint<T, D>
Blanket Implementations
Mutably borrows from an owned value. Read more
Lanewise greater than >
comparison.
Lanewise greater or equal >=
comparison.
Lanewise less or equal <=
comparison.
Clamps each lane of self
between the corresponding lane of min
and max
.
The min value among all lanes of self
.
The max value among all lanes of self
.
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.